In all of the TQString methods that take \fCconst char *\fR parameters, the \fCconst char *\fR is interpreted as a classic C-style '\0'-terminated ASCII string. It is legal for the \fCconst char *\fR parameter to be 0. If the \fCconst char *\fR is not '\0'-terminated, the results are undefined. Functions that copy classic C strings into a TQString will not copy the terminating '\0' character. The TQChar array of the TQString (as returned by unicode()) is generally not terminated by a '\0'. If you need to pass a TQString to a function that requires a C '\0'-terminated string use latin1().
A TQString that has not been assigned to anything is \fInull\fR, i.e. both the length and data pointer is 0. A TQString that references the empty string ("", a single '\0' char) is \fIempty\fR. Both null and empty TQStrings are legal parameters to the methods. Assigning \fC(const char *) 0\fR to TQString gives a null TQString. For convenience, TQString::null is a null TQString. When sorting, empty strings come first, followed by non-empty strings, followed by null strings. We recommend using \fCif ( !str.isNull() )\fR to check for a non-null string rather than \fCif ( !str )\fR; see operator!() for an explanation.
Note that if you find that you are mixing usage of TQCString, TQString, and TQByteArray, this causes lots of unnecessary copying and might indicate that the true nature of the data you are dealing with is uncertain. If the data is '\0'-terminated 8-bit data, use TQCString; if it is unterminated (i.e. contains '\0's) 8-bit data, use TQByteArray; if it is text, use TQString.
Lists of strings are handled by the TQStringList class. You can split a string into a list of strings using TQStringList::split(), and join a list of strings into a single string with an optional separator using TQStringList::join(). You can obtain a list of strings from a string list that contain a particular substring or that match a particular regex using TQStringList::grep().
The variable, result, is an auto variable allocated on the stack. When return is called, because we're returning by value, The copy constructor is called and a copy of the string is returned. (No actual copying takes place thanks to the implicit sharing, see below.)
The 'copying' of input to output is almost as fast as copying a pointer because behind the scenes copying is achieved by incrementing a reference count. TQString (like all Qt's implicitly shared classes) operates on a copy-on-write basis, only copying if an instance is actually changed.
\fCTQString::SectionDefault\fR - Empty fields are counted, leading and trailing separators are not included, and the separator is compared case sensitively.
\fCTQString::SectionSkipEmpty\fR - Treat empty fields as if they don't exist, i.e. they are not considered as far as \fIstart\fR and \fIend\fR are concerned.
If only \fIunicode\fR is 0, the string is empty but has \fIlength\fR characters of space preallocated: TQString expands automatically anyway, but this may speed up some cases a little. We recommend using the plain constructor and setLength() for this purpose since it will result in more readable code.
Constructs a string that is a deep copy of \fIstr\fR, interpreted as a classic C string. The encoding is assumed to be Latin-1, unless you change it using TQTextCodec::setCodecForCStrings().
This is a cast constructor, but it is perfectly safe: converting a Latin-1 \fCconst char *\fR to TQString preserves all the information. You can disable this constructor by defining \fCTQT_NO_CAST_ASCII\fR when you compile your applications. You can also make TQString objects by using setLatin1(), fromLatin1(), fromLocal8Bit(), and fromUtf8(). Or whatever encoding is appropriate for the 8-bit data you have.
This function will return a string that replaces the lowest numbered occurrence of \fC%1\fR, \fC%2\fR, ..., \fC%9\fR with \fIa\fR.
.PP
The \fIfieldWidth\fR value specifies the minimum amount of space that \fIa\fR is padded to. A positive value will produce right-aligned text, whereas a negative value will produce left-aligned text.
.PP
The following example shows how we could create a 'status' string when processing a list of files:
It is generally fine to use filenames and numbers as we have done in the example above. But note that using arg() to construct natural language sentences does not usually translate well into other languages because sentence structure and word order often differ between languages.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
The \fIfieldWidth\fR value specifies the minimum amount of space that \fIa\fR is padded to. A positive value will produce a right-aligned number, whereas a negative value will produce a left-aligned number.
.PP
\fIa\fR is expressed in base \fIbase\fR, which is 10 by default and must be between 2 and 36.
The '%' can be followed by an 'L', in which case the sequence is replaced with a localized representation of \fIa\fR. The conversion uses the default locale. The default locale is determined from the system's locale settings at application startup. It can be changed using TQLocale::setDefault(). The 'L' flag is ignored if \fIbase\fR is not 10.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
\fIa\fR is expressed in base \fIbase\fR, which is 10 by default and must be between 2 and 36. If \fIbase\fR is 10, the '%L' syntax can be used to produce localized strings.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
\fIa\fR is expressed in base \fIbase\fR, which is 10 by default and must be between 2 and 36. If \fIbase\fR is 10, the '%L' syntax can be used to produce localized strings.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
\fIa\fR is expressed in base \fIbase\fR, which is 10 by default and must be between 2 and 36. If \fIbase\fR is 10, the '%L' syntax can be used to produce localized strings.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
\fIa\fR is expressed in base \fIbase\fR, which is 10 by default and must be between 2 and 36. If \fIbase\fR is 10, the '%L' syntax can be used to produce localized strings.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
\fIa\fR is expressed in base \fIbase\fR, which is 10 by default and must be between 2 and 36. If \fIbase\fR is 10, the '%L' syntax can be used to produce localized strings.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
\fIa\fR is expressed in base \fIbase\fR, which is 10 by default and must be between 2 and 36. If \fIbase\fR is 10, the '%L' syntax can be used to produce localized strings.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
\fIa\fR is expressed in base \fIbase\fR, which is 10 by default and must be between 2 and 36. If \fIbase\fR is 10, the '%L' syntax can be used to produce localized strings.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Argument \fIa\fR is formatted according to the \fIfmt\fR format specified, which is 'g' by default and can be any of the following:
.PP
<center>.nf
.TS
l - l. Format Meaning format as [-]9.9e[+|-]999 format as [-]9.9E[+|-]999 format as [-]9.9 use use
.TE
.fi
</center>
.PP
With 'e', 'E', and 'f', \fIprec\fR is the number of digits after the decimal point. With 'g' and 'G', \fIprec\fR is the maximum number of significant digits (trailing zeroes are omitted).
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
This is the same as str.arg(\fIa1\fR).arg(\fIa2\fR), except that the strings are replaced in one pass. This can make a difference if \fIa1\fR contains e.g. \fC%1\fR:
If a codec has been set using TQTextCodec::codecForCStrings(), it is used to convert Unicode to 8-bit char. Otherwise, this function does the same as latin1().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
The function returns a reference to the character at index \fIi\fR. The resulting reference can then be assigned to, or used immediately, but it will become invalid once further modifications are made to the original string.
Lexically compares \fIs1\fR with \fIs2\fR and returns an integer less than, equal to, or greater than zero if \fIs1\fR is less than, equal to, or greater than \fIs2\fR.
The comparison is based exclusively on the numeric Unicode values of the characters and is very fast, but is not what a human would expect. Consider sorting user-interface strings with TQString::localeAwareCompare().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Lexically compares this string with \fIs\fR and returns an integer less than, equal to, or greater than zero if it is less than, equal to, or greater than \fIs\fR.
\fBWarning:\fR This function is not supported in TQt 3.x. It is provided for experimental and illustrative purposes only. It is mainly of interest to those experimenting with Arabic and other composition-rich texts.
Applies possible ligatures to a TQString. Useful when composition-rich text requires rendering with glyph-poor fonts, but it also makes compositions such as TQChar(0x0041) ('A') and TQChar(0x0308) (Unicode accent diaresis), giving TQChar(0x00c4) (German A Umlaut).
In TQt 1.x, this returned a char* allowing direct manipulation of the string as a sequence of bytes. In TQt 2.x where TQString is a Unicode string, char* conversion constructs a temporary string, and hence direct character operations are meaningless.
Finds the first match of the regular expression \fIrx\fR, starting from position \fIindex\fR. If \fIindex\fR is -1, the search starts at the last character; if -2, at the next to last character and so on. (See findRev() for searching backwards.)
.PP
Returns the position of the first match of \fIrx\fR or -1 if no match was found.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Finds the first occurrence of the character \fIc\fR, starting at position \fIindex\fR. If \fIindex\fR is -1, the search starts at the last character; if -2, at the next to last character and so on. (See findRev() for searching backwards.)
.PP
If \fIcs\fR is TRUE (the default), the search is case sensitive; otherwise the search is case insensitive.
.PP
Returns the position of \fIc\fR or -1 if \fIc\fR could not be found.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Finds the first occurrence of the string \fIstr\fR, starting at position \fIindex\fR. If \fIindex\fR is -1, the search starts at the last character, if it is -2, at the next to last character and so on. (See findRev() for searching backwards.)
.PP
If \fIcs\fR is TRUE (the default), the search is case sensitive; otherwise the search is case insensitive.
.PP
Returns the position of \fIstr\fR or -1 if \fIstr\fR could not be found.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Finds the first occurrence of the character \fIc\fR, starting at position \fIindex\fR and searching backwards. If the index is -1, the search starts at the last character, if it is -2, at the next to last character and so on.
.PP
Returns the position of \fIc\fR or -1 if \fIc\fR could not be found.
.PP
If \fIcs\fR is TRUE (the default), the search is case sensitive; otherwise the search is case insensitive.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Finds the first occurrence of the string \fIstr\fR, starting at position \fIindex\fR and searching backwards. If the index is -1, the search starts at the last character, if it is -2, at the next to last character and so on.
.PP
Returns the position of \fIstr\fR or -1 if \fIstr\fR could not be found.
.PP
If \fIcs\fR is TRUE (the default), the search is case sensitive; otherwise the search is case insensitive.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Finds the first match of the regexp \fIrx\fR, starting at position \fIindex\fR and searching backwards. If the index is -1, the search starts at the last character, if it is -2, at the next to last character and so on. (See findRev() for searching backwards.)
.PP
Returns the position of the match or -1 if no match was found.
Returns the Unicode string decoded from the first \fIlen\fR bytes of \fIascii\fR, ignoring the rest of \fIascii\fR. If \fIlen\fR is -1 then the length of \fIascii\fR is used. If \fIlen\fR is bigger than the length of \fIascii\fR then it will use the length of \fIascii\fR.
If a codec has been set using TQTextCodec::codecForCStrings(), it is used to convert the string from 8-bit characters to Unicode. Otherwise, this function does the same as fromLatin1().
This is the same as the TQString(const char*) constructor, but you can make that constructor invisible if you compile with the define \fCTQT_NO_CAST_ASCII\fR, in which case you can explicitly create a TQString from 8-bit ASCII text using this function.
Returns the Unicode string decoded from the first \fIlen\fR bytes of \fIchars\fR, ignoring the rest of \fIchars\fR. If \fIlen\fR is -1 then the length of \fIchars\fR is used. If \fIlen\fR is bigger than the length of \fIchars\fR then it will use the length of \fIchars\fR.
.PP
See also fromAscii().
.PP
Examples:
.)l listbox/listbox.cpp and network/mail/smtp.cpp.
Returns the Unicode string decoded from the first \fIlen\fR bytes of \fIlocal8Bit\fR, ignoring the rest of \fIlocal8Bit\fR. If \fIlen\fR is -1 then the length of \fIlocal8Bit\fR is used. If \fIlen\fR is bigger than the length of \fIlocal8Bit\fR then it will use the length of \fIlocal8Bit\fR.
Returns the Unicode string decoded from the first \fIlen\fR bytes of \fIutf8\fR, ignoring the rest of \fIutf8\fR. If \fIlen\fR is -1 then the length of \fIutf8\fR is used. If \fIlen\fR is bigger than the length of \fIutf8\fR then it will use the length of \fIutf8\fR.
Inserts \fIs\fR into the string at position \fIindex\fR.
.PP
If \fIindex\fR is beyond the end of the string, the string is extended with spaces to length \fIindex\fR and \fIs\fR is then appended and returns a reference to the string.
Returns a Latin-1 representation of the string. The returned value is undefined if the string contains non-Latin-1 characters. If you want to convert strings into formats other than Unicode, see the TQTextCodec classes.
Returns a string of length \fIwidth\fR that contains this string padded by the \fIfill\fR character.
.PP
If \fItruncate\fR is FALSE and the length of the string is more than \fIwidth\fR, then the returned string is a copy of the string.
.PP
If \fItruncate\fR is TRUE and the length of the string is more than \fIwidth\fR, then any characters in a copy of the string after length \fIwidth\fR are removed, and the copy is returned.
Returns the string encoded in a locale-specific format. On X11, this is the TQTextCodec::codecForLocale(). On Windows, it is a system-defined encoding. On Mac OS X, this always uses UTF-8 as the encoding.
Compares \fIs1\fR with \fIs2\fR and returns an integer less than, equal to, or greater than zero if \fIs1\fR is less than, equal to, or greater than \fIs2\fR.
.PP
The comparison is performed in a locale- and also platform-dependent manner. Use this function to present sorted lists of strings to the user.
Returns a string that contains the \fIlen\fR characters of this string, starting at position \fIindex\fR.
.PP
Returns a null string if the string is empty or \fIindex\fR is out of range. Returns the whole string from \fIindex\fR if \fIindex\fR + \fIlen\fR exceeds the length of the string.
A convenience function that returns a string equivalent of the number \fIn\fR to base \fIbase\fR, which is 10 by default and must be between 2 and 36. The returned string is in "C" locale.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
A convenience factory function that returns a string representation of the number \fIn\fR to the base \fIbase\fR, which is 10 by default and must be between 2 and 36.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Argument \fIn\fR is formatted according to the \fIf\fR format specified, which is \fCg\fR by default, and can be any of the following:
.PP
<center>.nf
.TS
l - l. Format Meaning format as [-]9.9e[+|-]999 format as [-]9.9E[+|-]999 format as [-]9.9 use use
.TE
.fi
</center>
.PP
With 'e', 'E', and 'f', \fIprec\fR is the number of digits after the decimal point. With 'g' and 'G', \fIprec\fR is the maximum number of significant digits (trailing zeroes are omitted).
Returns ascii(). Be sure to see the warnings documented in the ascii() function. Note that for new code which you wish to be strictly Unicode-clean, you can define the macro \fCTQT_NO_ASCII_CAST\fR when compiling your code to hide this function so that automatic casts are not done. This has the added advantage that you catch the programming error described in operator!().
\fBWarning:\fR The function may cause an application to crash if a static C run-time is in use. This can happen in Microsoft Visual C++ if TQt is configured as single-threaded. A safe alternative is to call ascii() directly and construct a std::string manually.
It will call "operator const char*()", which is inefficent; you may wish to define the macro \fCTQT_NO_ASCII_CAST\fR when writing code which you wish to remain Unicode-clean.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
The function returns a reference to the character at index \fIi\fR. The resulting reference can then be assigned to, or used immediately, but it will become invalid once further modifications are made to the original string.
If \fIi\fR is beyond the length of the string then the string is expanded with TQChar::nulls, so that the TQCharRef references a valid (null) character in the string.
The TQCharRef internal class can be used much like a constant TQChar, but if you assign to it, you change the original string (which will detach itself because of TQString's copy-on-write semantics). You will get compilation errors if you try to use the result as anything but a TQChar.
Returns the TQChar at index \fIi\fR by reference, expanding the string with TQChar::null if necessary. The resulting reference can be assigned to, or otherwise used immediately, but becomes invalid once furher modifications are made to the string.
Removes \fIlen\fR characters from the string starting at position \fIindex\fR, and returns a reference to the string.
.PP
If \fIindex\fR is beyond the length of the string, nothing happens. If \fIindex\fR is within the string, but \fIindex\fR + \fIlen\fR is beyond the end of the string, the string is truncated at position \fIindex\fR.
Replaces \fIlen\fR characters from the string with \fIs\fR, starting at position \fIindex\fR, and returns a reference to the string.
.PP
If \fIindex\fR is beyond the length of the string, nothing is deleted and \fIs\fR is appended at the end of the string. If \fIindex\fR is valid, but \fIindex\fR + \fIlen\fR is beyond the end of the string, the string is truncated at position \fIindex\fR, then \fIs\fR is appended at the end.
\fBWarning:\fR TQt 3.3.3 and earlier had different semantics for the case \fIindex\fR >= length(), which contradicted the documentation. To avoid portability problems between TQt 3 versions and with TQt 4, we recommend that you never call the function with \fIindex\fR >= length().
Replaces \fIlen\fR characters with \fIslen\fR characters of TQChar data from \fIs\fR, starting at position \fIindex\fR, and returns a reference to the string.
For regexps containing capturing parentheses, occurrences of \fB\1\fR, \fB\2\fR, ..., in \fIafter\fR are replaced with \fIrx\fR.cap(1), cap(2), ...
Ensures that at least \fIminCapacity\fR characters are allocated to the string.
.PP
This function is useful for code that needs to build up a long string and wants to avoid repeated reallocation. In this example, we want to add to the string until some condition is true, and we're fairly sure that size is big enough:
This string is treated as a sequence of fields separated by the character, \fIsep\fR. The returned string consists of the fields from position \fIstart\fR to position \fIend\fR inclusive. If \fIend\fR is not specified, all fields from position \fIstart\fR to the end of the string are included. Fields are numbered 0, 1, 2, etc., counting from the left, and -1, -2, etc., counting from right to left.
.PP
The \fIflags\fR argument can be used to affect some aspects of the function's behaviour, e.g. whether to be case sensitive, whether to skip empty fields and how to deal with leading and trailing separators; see SectionFlags.
If \fIstart\fR or \fIend\fR is negative, we count fields from the right of the string, the right-most field being -1, the one from right-most field being -2, and so on.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
This function returns a section of the string.
.PP
This string is treated as a sequence of fields separated by the string, \fIsep\fR. The returned string consists of the fields from position \fIstart\fR to position \fIend\fR inclusive. If \fIend\fR is not specified, all fields from position \fIstart\fR to the end of the string are included. Fields are numbered 0, 1, 2, etc., counting from the left, and -1, -2, etc., counting from right to left.
.PP
The \fIflags\fR argument can be used to affect some aspects of the function's behaviour, e.g. whether to be case sensitive, whether to skip empty fields and how to deal with leading and trailing separators; see SectionFlags.
If \fIstart\fR or \fIend\fR is negative, we count fields from the right of the string, the right-most field being -1, the one from right-most field being -2, and so on.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
This function returns a section of the string.
.PP
This string is treated as a sequence of fields separated by the regular expression, \fIreg\fR. The returned string consists of the fields from position \fIstart\fR to position \fIend\fR inclusive. If \fIend\fR is not specified, all fields from position \fIstart\fR to the end of the string are included. Fields are numbered 0, 1, 2, etc., counting from the left, and -1, -2, etc., counting from right to left.
.PP
The \fIflags\fR argument can be used to affect some aspects of the function's behaviour, e.g. whether to be case sensitive, whether to skip empty fields and how to deal with leading and trailing separators; see SectionFlags.
If \fIstart\fR or \fIend\fR is negative, we count fields from the right of the string, the right-most field being -1, the one from right-most field being -2, and so on.
Ensures that at least \fInewLen\fR characters are allocated to the string, and sets the length of the string to \fInewLen\fR. Any new space allocated contains arbitrary data.
Resizes the string to \fIlen\fR characters and copies \fIunicode\fR into the string. If \fIunicode\fR is 0, nothing is copied, but the string is still resized to \fIlen\fR. If \fIlen\fR is zero, then the string becomes a null string.
Resizes the string to \fIlen\fR characters and copies \fIunicode_as_ushorts\fR into the string (on some X11 client platforms this will involve a byte-swapping pass).
.PP
If \fIunicode_as_ushorts\fR is 0, nothing is copied, but the string is still resized to \fIlen\fR. If \fIlen\fR is zero, the string becomes a null string.
Returns a string that has whitespace removed from the start and the end, and which has each sequence of internal whitespace replaced with a single space.
Whitespace means any character for which TQChar::isSpace() returns TRUE. This includes Unicode characters with decimal values 9 (TAB), 10 (LF), 11 (VT), 12 (FF), 13 (CR), and 32 (Space).
Safely builds a formatted string from the format string \fIcformat\fR and an arbitrary list of arguments. The format string supports all the escape sequences of printf() in the standard C library.
The %s escape sequence expects a utf8() encoded string. The format string \fIcformat\fR is expected to be in latin1. If you need a Unicode format string, use arg() instead. For typesafe string building, with full Unicode support, you can use TQTextOStream like this:
For translations, especially if the strings contains more than one escape sequence, you should consider using the arg() function instead. This allows the order of the replacements to be controlled by the translator, and has Unicode support.
The %lc escape sequence expects a unicode character of type ushort (as returned by TQChar::unicode()). The %ls escape sequence expects a pointer to a zero-terminated array of unicode characters of type ushort (as returned by TQString::ucs2()).
Whitespace means any character for which TQChar::isSpace() returns TRUE. This includes Unicode characters with decimal values 9 (TAB), 10 (LF), 11 (VT), 12 (FF), 13 (CR) and 32 (Space), and may also include other Unicode characters.
toDouble() can handle numbers represented in various locales. These representations may use different characters for the decimal point, thousands group sepearator and even individual digits. TQString's functions try to interpret the string according to the current locale. The current locale is determined from the system at application startup and can be changed by calling TQLocale::setDefault(). If the string cannot be interpreted according to the current locale, this function falls back on the "C" locale.
Due to the ambiguity between the decimal point and thousands group separator in various locales, these functions do not handle thousands group separators. If you need to convert such numbers, use the corresponding function in TQLocale.
\fBWarning:\fR If the string contains trailing whitespace this function will fail, and set \fI*ok\fR to false if \fIok\fR is not 0. Leading whitespace is ignored.
\fBWarning:\fR If the string contains trailing whitespace this function will fail, settings \fI*ok\fR to false if \fIok\fR is not 0. Leading whitespace is ignored.
Returns the string converted to an \fCint\fR using base \fIbase\fR, which is 10 by default and must be between 2 and 36 or 0. If \fIbase\fR is 0, the base is determined automatically using the following rules:
.TP
If the string begins with "0x", it is assumed to be hexadecimal;
.TP
If it begins with "0", it is assumed to be octal;
.TP
Otherwise it is assumed to be decimal.
.PP
Returns 0 if the conversion fails.
.PP
If \fIok\fR is not 0: if a conversion error occurs, \fI*ok\fR is set to FALSE; otherwise \fI*ok\fR is set to TRUE.
Returns the string converted to a \fClong\fR using base \fIbase\fR, which is 10 by default and must be between 2 and 36 or 0. If \fIbase\fR is 0, the base is determined automatically using the following rules:
.TP
If the string begins with "0x", it is assumed to be hexadecimal;
.TP
If it begins with "0", it is assumed to be octal;
.TP
Otherwise it is assumed to be decimal.
.PP
Returns 0 if the conversion fails.
.PP
If \fIok\fR is not 0: if a conversion error occurs, \fI*ok\fR is set to FALSE; otherwise \fI*ok\fR is set to TRUE.
.PP
Leading and trailing whitespace is ignored by this function.
Returns the string converted to a \fClong long\fR using base \fIbase\fR, which is 10 by default and must be between 2 and 36 or 0. If \fIbase\fR is 0, the base is determined automatically using the following rules:
.TP
If the string begins with "0x", it is assumed to be hexadecimal;
.TP
If it begins with "0", it is assumed to be octal;
.TP
Otherwise it is assumed to be decimal.
.PP
Returns 0 if the conversion fails.
.PP
If \fIok\fR is not 0: if a conversion error occurs, \fI*ok\fR is set to FALSE; otherwise \fI*ok\fR is set to TRUE.
.PP
Leading and trailing whitespace is ignored by this function.
Returns the string converted to a \fCshort\fR using base \fIbase\fR, which is 10 by default and must be between 2 and 36 or 0. If \fIbase\fR is 0, the base is determined automatically using the following rules:
.TP
If the string begins with "0x", it is assumed to be hexadecimal;
.TP
If it begins with "0", it is assumed to be octal;
.TP
Otherwise it is assumed to be decimal.
.PP
Returns 0 if the conversion fails.
.PP
If \fIok\fR is not 0: if a conversion error occurs, \fI*ok\fR is set to FALSE; otherwise \fI*ok\fR is set to TRUE.
.PP
Leading and trailing whitespace is ignored by this function.
Returns the string converted to an \fCunsigned int\fR using base \fIbase\fR, which is 10 by default and must be between 2 and 36 or 0. If \fIbase\fR is 0, the base is determined automatically using the following rules:
.TP
If the string begins with "0x", it is assumed to be hexadecimal;
.TP
If it begins with "0", it is assumed to be octal;
.TP
Otherwise it is assumed to be decimal.
.PP
Returns 0 if the conversion fails.
.PP
If \fIok\fR is not 0: if a conversion error occurs, \fI*ok\fR is set to FALSE; otherwise \fI*ok\fR is set to TRUE.
.PP
Leading and trailing whitespace is ignored by this function.
Returns the string converted to an \fCunsigned long\fR using base \fIbase\fR, which is 10 by default and must be between 2 and 36 or 0. If \fIbase\fR is 0, the base is determined automatically using the following rules:
.TP
If the string begins with "0x", it is assumed to be hexadecimal;
.TP
If it begins with "0", it is assumed to be octal;
.TP
Otherwise it is assumed to be decimal.
.PP
Returns 0 if the conversion fails.
.PP
If \fIok\fR is not 0: if a conversion error occurs, \fI*ok\fR is set to FALSE; otherwise \fI*ok\fR is set to TRUE.
.PP
Leading and trailing whitespace is ignored by this function.
Returns the string converted to an \fCunsigned long long\fR using base \fIbase\fR, which is 10 by default and must be between 2 and 36 or 0. If \fIbase\fR is 0, the base is determined automatically using the following rules:
.TP
If the string begins with "0x", it is assumed to be hexadecimal;
.TP
If it begins with "0", it is assumed to be octal;
.TP
Otherwise it is assumed to be decimal.
.PP
Returns 0 if the conversion fails.
.PP
If \fIok\fR is not 0: if a conversion error occurs, \fI*ok\fR is set to FALSE; otherwise \fI*ok\fR is set to TRUE.
.PP
Leading and trailing whitespace is ignored by this function.
Returns the string converted to an \fCunsigned short\fR using base \fIbase\fR, which is 10 by default and must be between 2 and 36 or 0. If \fIbase\fR is 0, the base is determined automatically using the following rules:
.TP
If the string begins with "0x", it is assumed to be hexadecimal;
.TP
If it begins with "0", it is assumed to be octal;
.TP
Otherwise it is assumed to be decimal.
.PP
Returns 0 if the conversion fails.
.PP
If \fIok\fR is not 0: if a conversion error occurs, \fI*ok\fR is set to FALSE; otherwise \fI*ok\fR is set to TRUE.
.PP
Leading and trailing whitespace is ignored by this function.
Returns TRUE if \fIs1\fR is lexically less than or equal to \fIs2\fR; otherwise returns FALSE. The comparison is case sensitive. Note that a null string is not equal to a not-null empty string.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Returns TRUE if \fIs1\fR is lexically less than or equal to \fIs2\fR; otherwise returns FALSE. The comparison is case sensitive. Note that a null string is not equal to a not-null empty string.
Returns TRUE if \fIs1\fR is lexically greater than or equal to \fIs2\fR; otherwise returns FALSE. The comparison is case sensitive. Note that a null string is not equal to a not-null empty string.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Returns TRUE if \fIs1\fR is lexically greater than or equal to \fIs2\fR; otherwise returns FALSE. The comparison is case sensitive. Note that a null string is not equal to a not-null empty string.