Class for smart character strings. More...
#include <Inventor/SbString.h>
Public Member Functions | |
SbString () | |
Default constructor. | |
SbString (const std::string &std_string) | |
Constructor that takes an STL string. | |
SbString (const std::wstring &std_wstring) | |
Constructor that takes an STL wstring. | |
SbString (const char *str) | |
Constructor that takes a character string. | |
SbString (const char *str, int start, int end) | |
Constructor that takes the subset of a character string from start to end (inclusive). | |
SbString (const wchar_t *str, int start, int end) | |
Constructor that takes the subset of a wide char string from start to end (inclusive). | |
SbString (const SbString &str) | |
Constructor that takes an SbString. | |
SbString (const wchar_t *str) | |
Constructor that takes a wide character string. | |
~SbString () | |
Destructor. | |
SbBool | isEmpty () const |
Returns TRUE if the string is empty. | |
SbBool | isNull () const |
Returns TRUE if the string is a null string. | |
int | getLength () const |
Returns length of string (zero if null or empty). | |
void | makeEmpty (const SbBool freeOld=TRUE) |
Sets string to be the empty string (""). | |
void | makeNull () |
Makes the current string null (same as uninitialized). | |
SbString | getSubString (int startChar, int endChar=-1) const |
Returns a new string containing the sub-string from startChar (position) to endChar, inclusive. | |
void | deleteSubString (int startChar, int endChar=-1) |
Deletes the characters from startChar to endChar, inclusive, from the string. | |
SbBool | contains (const SbString &str) const |
Returns TRUE if the string contains the specified substring. | |
bool | endsWith (const SbString &str) const |
Returns true if the string ends with the specified string. | |
int | find (const SbString &str) const |
Returns the position of the first occurence of the specified substring. | |
int | rfind (const SbString &str) const |
Returns the position of the last occurence of the specified substring. | |
int | findLast (const SbString &str) const |
Returns the position of the last occurence of any character contained in the specified sub string. | |
SbBool | containsAny (const SbString &str) const |
Returns TRUE if any of the characters listed in the str parameter exist in the string. | |
int | findAny (const SbString &str) const |
Returns the position of the first occurence of any character contained in the specified sub string. | |
void | replace (const SbString &patternStr, const SbString &substStr) |
This function replaces all the occurence of patternStr by the new string substStr. | |
SbString | lower () const |
Returns a lowercase copy of the string. | |
SbString | upper () const |
Returns an uppercase copy of the string. | |
SbString & | setNum (short value, int base=10) |
Sets the string to a formatted numeric value. | |
SbString & | setNum (unsigned short value, int base=10) |
Sets the string to a formatted numeric value. | |
SbString & | setNum (int value, int base=10) |
Sets the string to a formatted numeric value. | |
SbString & | setNum (unsigned int value, int base=10) |
Sets the string to a formatted numeric value. | |
SbString & | setNum (long value, int base=10) |
Sets the string to a formatted numeric value. | |
SbString & | setNum (unsigned long value, int base=10) |
Sets the string to a formatted numeric value. | |
SbString & | setNum (double value) |
Sets the string to a formatted numeric value. | |
SbString & | setNum (float value) |
Sets the string to a formatted numeric value. | |
unsigned short | toUShort (SbBool *ok=NULL) const |
Returns the numeric value represented by the string. | |
short | toShort (SbBool *ok=NULL) const |
Returns the numeric value represented by the string. | |
unsigned int | toUInt (SbBool *ok=NULL) const |
Returns the numeric value represented by the string. | |
int | toInt (SbBool *ok=NULL) const |
Returns the numeric value represented by the string. | |
unsigned long | toULong (SbBool *ok=NULL) const |
Returns the numeric value represented by the string. | |
long | toLong (SbBool *ok=NULL) const |
Returns the numeric value represented by the string. | |
float | toFloat (SbBool *ok=NULL) const |
Returns the numeric value represented by the string. | |
double | toDouble (SbBool *ok=NULL) const |
Returns the numeric value represented by the string. | |
SbBool | isUnicode () const |
Returns TRUE if the string contains Unicode characters. | |
SbString & | fromLatin1 (const char *str) |
Set the string from a Latin-1/ASCII C string. | |
SbString & | fromUtf16 (const unsigned short *str) |
Set the string from a UTF-16 string. | |
SbString & | fromWideChar (const wchar_t *str) |
Set the string from a wide char string. | |
const char * | toLatin1 () const |
Returns the string as a Latin-1/ASCII C string. | |
unsigned short * | toUtf16 () const |
Returns the string as a UTF-16 string. | |
const wchar_t * | toWideChar () const |
Returns the string as a wide char string. | |
std::wstring | toStdWString () const |
Returns the string as an STL wstring. | |
std::string | toStdString () const |
Returns the string as an STL string. | |
SbString & | operator+= (const SbString &str) |
Concatenation operator "+=" for SbString, SbString. | |
SbString & | operator+= (const char *str) |
Concatenation operator "+=" for string, SbString. | |
SbString & | operator= (const SbString &str) |
Assignment operator for SbString. | |
SbString & | operator= (const char *str) |
Assignment operator for character string. | |
uint32_t | hash () const |
Returns a reasonable hash key for string. | |
SoNONUNICODE | SbString (const int digitString) |
Constructor that takes an integer to be turned into a string. | |
SoNONUNICODE const char * | getString () const |
Returns pointer to the character string. | |
SoNONUNICODE const std::string & | getSString () const |
Returns pointer to the std::string. | |
SoNONUNICODE SbString & | sprintf (const char *cformat,...) |
Builds a formatted string from the format string cformat and an arbitrary list of arguments. | |
SoNONUNICODE SbString & | vprintf (const char *cformat, va_list arg) |
Write into string using vprintf() syntax. | |
SoNONUNICODE char | operator[] (int i) const |
Returns the character at index i, or 0 if i is beyond the length of the string. | |
SoNONUNICODE int | operator! () const |
Unary "not" operator; returns TRUE if string is empty (""). | |
SoNONUNICODE const SO_WCHAR_T * | wgetString () const |
Returns pointer to the character string. | |
SoNONUNICODE const std::wstring & | wgetSString () const |
Returns pointer to the stl::wstring. | |
SoNONUNICODE SbString & | operator= (const SO_WCHAR_T *str) |
Assignment operator for character string, SbString. | |
SoNONUNICODE SbString & | operator+= (const SO_WCHAR_T *str) |
Concatenation operator "+=" for SbString. | |
Static Public Attributes | |
static const int | npos |
This constant is used to indicate when a find string action failed. | |
Friends | |
const SbString | operator+ (const SbString &s1, const SbString &s2) |
Returns a string which is the result of concatenating the string s1 and the string s2. | |
int | operator== (const SbString &str1, const SbString &str2) |
Equality operator for SbString / SbString comparison. | |
int | operator== (const SbString &str, const char *s) |
Equality operator for SbString / char* comparison. | |
int | operator== (const char *s, const SbString &str) |
Equality operator for char* / SbString comparison. | |
int | operator!= (const SbString &str1, const SbString &str2) |
Inequality operator for SbString / SbString comparison. | |
bool | operator< (const SbString &str1, const SbString &str2) |
"less than" relational operator for SbString Returns TRUE if the first operand is less than the second, FALSE otherwise. | |
bool | operator> (const SbString &str1, const SbString &str2) |
"greater than" relational operator for SbString Returns TRUE if the first operand is greater than the second, FALSE otherwise. | |
bool | operator<= (const SbString &str1, const SbString &str2) |
"less than or equal" relational operator for SbString Returns TRUE if the first operand is less than or equal to the second, FALSE otherwise. | |
bool | operator>= (const SbString &str1, const SbString &str2) |
"greater than or equal" relational operator for SbString Returns TRUE if the first operand is greater than or equal to the second, FALSE otherwise. | |
std::ostream & | operator<< (std::ostream &os, const SbString &str) |
Writes the string to the specified output stream. | |
SoNONUNICODE friend const SbString | operator+ (const SbString &s1, const char *s2) |
This is an overloaded member function, provided for convenience. | |
SoNONUNICODE friend const SbString | operator+ (const char *s1, const SbString &s2) |
This is an overloaded member function, provided for convenience. | |
SoNONUNICODE friend int | operator== (const SbString &str, const std::string &s) |
Equality operator for SbString / std::string comparison. | |
SoNONUNICODE friend int | operator== (const std::string &s, const SbString &str) |
Equality operator for std::string / SbString comparison. | |
SoNONUNICODE friend int | operator!= (const SbString &str, const char *s) |
Inequality operator for SbString / char* comparison. | |
SoNONUNICODE friend int | operator!= (const char *s, const SbString &str) |
Inequality operator for char* / SbString comparison. | |
SoNONUNICODE friend bool | operator< (const SbString &str, const char *s) |
"less than" relational operator for SbString / char* that returns TRUE if the first operand is less than the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator< (const char *s, const SbString &str) |
"less than" relational operator for char* / SbString that returns TRUE if the first operand is less than the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator< (const SbString &str, const std::string &s) |
"less than" relational operator for SbString / std::string that returns TRUE if the first operand is less than the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator< (const std::string &s, const SbString &str) |
"less than" relational operator for std::string / SbString that returns TRUE if the first operand is less than the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator> (const SbString &str, const char *s) |
"greater than" relational operator for SbString / char* that returns TRUE if the first operand is greater than the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator> (const char *s, const SbString &str) |
"greater than" relational operator for char* / SbString that returns TRUE if the first operand is greater than the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator> (const SbString &str, const std::string &s) |
"greater than" relational operator for SbString / std::string that returns TRUE if the first operand is greater than the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator> (const std::string &s, const SbString &str) |
"greater than" relational operator for std::string / SbString that returns TRUE if the first operand is greater than the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator<= (const SbString &str, const char *s) |
"less than or equal" relational operator for SbString / char* that returns TRUE if the first operand is less than or equal to the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator<= (const char *s, const SbString &str) |
"less than or equal" relational operator for char* / SbString that returns TRUE if the first operand is less than or equal to the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator<= (const SbString &str, const std::string &s) |
"less than or equal" relational operator for SbString / std::string that returns TRUE if the first operand is less than or equal to the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator<= (const std::string &s, const SbString &str) |
"less than or equal" relational operator for std::string / SbString that returns TRUE if the first operand is less than or equal to the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator>= (const SbString &str, const char *s) |
"greater than or equal" relational operator for SbString / char* that returns TRUE if the first operand is greater than or equal to the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator>= (const char *s, const SbString &str) |
"greater than or equal" relational operator for char* / SbString that returns TRUE if the first operand is greater than or equal to the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator>= (const SbString &str, const std::string &s) |
"greater than or equal" relational operator for SbString / std::string that returns TRUE if the first operand is greater than or equal to the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator>= (const std::string &s, const SbString &str) |
"greater than or equal" relational operator for std::string / SbString that returns TRUE if the first operand is greater than or equal to the second, FALSE otherwise. | |
SoNONUNICODE friend int | operator== (const SbString &str, const SO_WCHAR_T *s) |
Equality operator for SbString / wchar_t* comparison. | |
SoNONUNICODE friend int | operator== (const SO_WCHAR_T *s, const SbString &str) |
Equality operator for wchar_t* / SbString comparison. | |
SoNONUNICODE friend int | operator== (const SbString &str, const std::wstring &s) |
Equality operator for SbString / std::wstring comparison. | |
SoNONUNICODE friend int | operator== (const std::wstring &s, const SbString &str) |
Equality operator for std::wstring / SbString comparison. | |
SoNONUNICODE friend int | operator!= (const SbString &str, const SO_WCHAR_T *s) |
Inequality operator for SbString / wchar_t* comparison. | |
SoNONUNICODE friend int | operator!= (const SO_WCHAR_T *s, const SbString &str) |
Inequality operator for wchar_t* / SbString comparison. | |
SoNONUNICODE friend bool | operator< (const SbString &str, const SO_WCHAR_T *s) |
"less than" relational operator for SbString / wchar_t* that returns TRUE if the first operand is less than the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator< (const SO_WCHAR_T *s, const SbString &str) |
"less than" relational operator for wchar_t* / SbString that returns TRUE if the first operand is less than the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator< (const SbString &str, const std::wstring &s) |
"less than" relational operator for SbString / std::wstring that returns TRUE if the first operand is less than the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator< (const std::wstring &s, const SbString &str) |
"less than" relational operator for std::wstring / SbString that returns TRUE if the first operand is less than the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator> (const SbString &str, const SO_WCHAR_T *s) |
"greater than" relational operator for SbString/wchar_t* that returns TRUE if the first operand is greater than the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator> (const SO_WCHAR_T *s, const SbString &str) |
"greater than" relational operator for wchar_t* / SbString that returns TRUE if the first operand is greater than the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator> (const SbString &str, const std::wstring &s) |
"greater than" relational operator for SbString / std::wstring that returns TRUE if the first operand is greater than the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator> (const std::wstring &s, const SbString &str) |
"greater than" relational operator for std::wstring / SbString that returns TRUE if the first operand is greater than the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator<= (const SbString &str, const SO_WCHAR_T *s) |
"less than or equal" relational operator for SbString / wchar_t* that returns TRUE if the first operand is less than or equal to the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator<= (const SO_WCHAR_T *s, const SbString &str) |
"less than or equal" relational operator for wchar_t* / SbString that returns TRUE if the first operand is less than or equal to the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator<= (const SbString &str, const std::wstring &s) |
"less than or equal" relational operator for SbString / std::wstring that returns TRUE if the first operand is less than or equal to the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator<= (const std::wstring &s, const SbString &str) |
"less than or equal" relational operator for std::wstring / SbString that returns TRUE if the first operand is less than or equal to the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator>= (const SbString &str, const SO_WCHAR_T *s) |
"greater than or equal" relational operator for SbString / wchar_t* that returns TRUE if the first operand is greater than or equal to the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator>= (const SO_WCHAR_T *s, const SbString &str) |
"greater than or equal" relational operator for wchar_t* / SbString that returns TRUE if the first operand is greater than or equal to the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator>= (const SbString &str, const std::wstring &s) |
"greater than or equal" relational operator for SbString / std::wstring that returns TRUE if the first operand is greater than or equal to the second, FALSE otherwise. | |
SoNONUNICODE friend bool | operator>= (const std::wstring &s, const SbString &str) |
"greater than or equal" relational operator for std::wstring / SbString that returns TRUE if the first operand is greater than or equal to the second, FALSE otherwise. | |
Class for smart character strings.
The class SbString provides functions to manage strings of Latin-1 (ASCII) or Unicode characters.
About Unicode:
For more information about the Unicode standard, see http://unicode.org
About SO_WCHAR_T:
This macro was introduced in order to have generic code across Windows and Linux platforms. Because on Linux platforms wchar_t doesn't have the same type as on the Windows platform, it was decided to add this macro to keep a common size on both systems.
Since OpenInventor 8.0 there are separate functions and it is possible to use functions, on both systems, which use the same data size. Most of the time it's better to use utf16 functions when the size of the characters must be constant whatever is the platform.
SO_WCHAR_T is now deprecated and should not be used except for specific issues.
About locales:
In order to read values in IV files the initClass function overwrites some locales using the setlocales function provided by the standard lib C. Setting the locale after the init of OpenInventor can break reading IV files.
String manipulation:
Since OpenInventor 8.0 SbString has many new functions for string manipulation including:
1) Construction of a string from a regular Latin-1/Ascii C string.
2) Construction of a string from a WideChar string (wchar_t string).
3) Conversion SbString <-> QString
4) Find/Contains examples:
5) Number to string
6) String to Number
SbName, SbFileHelper, SbStringList
Definition at line 202 of file SbString.h.
SbString::SbString | ( | ) |
Default constructor.
The string is initially empty.
SbString::SbString | ( | const std::string & | std_string | ) |
Constructor that takes an STL string.
SbString::SbString | ( | const std::wstring & | std_wstring | ) |
Constructor that takes an STL wstring.
SbString::SbString | ( | const char * | str | ) |
Constructor that takes a character string.
SbString::SbString | ( | const char * | str, |
int | start, | ||
int | end | ||
) |
Constructor that takes the subset of a character string from start to end (inclusive).
For example, SbString("Testing",1,3) creates the string "est".
SbString::SbString | ( | const wchar_t * | str, |
int | start, | ||
int | end | ||
) |
Constructor that takes the subset of a wide char string from start to end (inclusive).
For example, SbString("Testing",1,3) creates the string "est".
SbString::SbString | ( | const wchar_t * | str | ) |
Constructor that takes a wide character string.
SbString::~SbString | ( | ) |
Destructor.
SoNONUNICODE SbString::SbString | ( | const int | digitString | ) |
Constructor that takes an integer to be turned into a string.
For example, SbString(1234) creates the string "1234".
Non Unicode: This function should not be used in a Unicode application. Use the setNum() methods instead.
Returns TRUE if the string contains the specified substring.
Returns TRUE if any of the characters listed in the str parameter exist in the string.
void SbString::deleteSubString | ( | int | startChar, |
int | endChar = -1 |
||
) |
Deletes the characters from startChar to endChar, inclusive, from the string.
If endChar is -1 (the default), all characters from startChar until the end are deleted.
bool SbString::endsWith | ( | const SbString & | str | ) | const |
Returns true if the string ends with the specified string.
int SbString::find | ( | const SbString & | str | ) | const |
Returns the position of the first occurence of the specified substring.
If not found, returns npos .
int SbString::findAny | ( | const SbString & | str | ) | const |
Returns the position of the first occurence of any character contained in the specified sub string.
If not found, returns npos .
int SbString::findLast | ( | const SbString & | str | ) | const |
Returns the position of the last occurence of any character contained in the specified sub string.
If not found, returns npos .
SbString & SbString::fromLatin1 | ( | const char * | str | ) |
Set the string from a Latin-1/ASCII C string.
SbString & SbString::fromUtf16 | ( | const unsigned short * | str | ) |
Set the string from a UTF-16 string.
SbString & SbString::fromWideChar | ( | const wchar_t * | str | ) |
Set the string from a wide char string.
int SbString::getLength | ( | ) | const |
Returns length of string (zero if null or empty).
SoNONUNICODE const std::string & SbString::getSString | ( | ) | const |
Returns pointer to the std::string.
Non Unicode: This function should not be used in a Unicode application. Use the toSTDString() method instead.
SoNONUNICODE const char * SbString::getString | ( | ) | const |
Returns pointer to the character string.
Non Unicode: This function should not be used in a Unicode application. Use the toLatin1() method instead.
SbString SbString::getSubString | ( | int | startChar, |
int | endChar = -1 |
||
) | const |
Returns a new string containing the sub-string from startChar (position) to endChar, inclusive.
If endChar is -1 (the default), the sub-string from startChar until the end is returned.
uint32_t SbString::hash | ( | ) | const |
Returns a reasonable hash key for string.
|
inline |
Returns TRUE if the string is empty.
i.e. if length() == 0; otherwise returns FALSE. Null strings are also empty. See makeEmpty().
Definition at line 1162 of file SbString.h.
|
inline |
Returns TRUE if the string is a null string.
A null string has never been initialized. See makeNull().
Definition at line 1168 of file SbString.h.
SbBool SbString::isUnicode | ( | ) | const |
Returns TRUE if the string contains Unicode characters.
Sets string to be the empty string ("").
Note: freeOld is no longer used, it is kept for compatibility. Formerly if freeOld was TRUE (default), any old storage was freed up.
void SbString::makeNull | ( | ) |
Makes the current string null (same as uninitialized).
SoNONUNICODE int SbString::operator! | ( | ) | const |
Unary "not" operator; returns TRUE if string is empty ("").
Non Unicode: This function should not be used in a Unicode application.
SbString & SbString::operator+= | ( | const char * | str | ) |
Concatenation operator "+=" for string, SbString.
SoNONUNICODE SbString & SbString::operator+= | ( | const SO_WCHAR_T * | str | ) |
Concatenation operator "+=" for SbString.
SbString & SbString::operator= | ( | const char * | str | ) |
Assignment operator for character string.
SoNONUNICODE SbString & SbString::operator= | ( | const SO_WCHAR_T * | str | ) |
Assignment operator for character string, SbString.
SoNONUNICODE char SbString::operator[] | ( | int | i | ) | const |
Returns the character at index i, or 0 if i is beyond the length of the string.
Non Unicode: This function should not be used in a Unicode application.
This function replaces all the occurence of patternStr by the new string substStr.
int SbString::rfind | ( | const SbString & | str | ) | const |
Returns the position of the last occurence of the specified substring.
If not found, returns npos .
SbString & SbString::setNum | ( | double | value | ) |
Sets the string to a formatted numeric value.
SbString & SbString::setNum | ( | float | value | ) |
Sets the string to a formatted numeric value.
SbString & SbString::setNum | ( | int | value, |
int | base = 10 |
||
) |
Sets the string to a formatted numeric value.
base must be one of the following values or the result is an empty string:
SbString & SbString::setNum | ( | long | value, |
int | base = 10 |
||
) |
Sets the string to a formatted numeric value.
base must be one of the following values or the result is an empty string:
SbString & SbString::setNum | ( | short | value, |
int | base = 10 |
||
) |
Sets the string to a formatted numeric value.
base must be one of the following values or the result is an empty string:
SbString & SbString::setNum | ( | unsigned int | value, |
int | base = 10 |
||
) |
Sets the string to a formatted numeric value.
base must be one of the following values or the result is an empty string:
SbString & SbString::setNum | ( | unsigned long | value, |
int | base = 10 |
||
) |
Sets the string to a formatted numeric value.
base must be one of the following values or the result is an empty string:
SbString & SbString::setNum | ( | unsigned short | value, |
int | base = 10 |
||
) |
Sets the string to a formatted numeric value.
base must be one of the following values or the result is an empty string:
SoNONUNICODE SbString & SbString::sprintf | ( | const char * | cformat, |
... | |||
) |
Builds a formatted string from the format string cformat and an arbitrary list of arguments.
The format string supports all the escape sequences of printf() in the standard C library.
Non Unicode: This function should not be used in a Unicode application.
double SbString::toDouble | ( | SbBool * | ok = NULL | ) | const |
Returns the numeric value represented by the string.
Returns 0 if the conversion fails. Optional parameter ok is set to TRUE if the conversion was successful, else to FALSE.
float SbString::toFloat | ( | SbBool * | ok = NULL | ) | const |
Returns the numeric value represented by the string.
Returns 0 if the conversion fails. Optional parameter ok is set to TRUE if the conversion was successful, else to FALSE.
int SbString::toInt | ( | SbBool * | ok = NULL | ) | const |
Returns the numeric value represented by the string.
Returns 0 if the conversion fails. Optional parameter ok is set to TRUE if the conversion was successful, else to FALSE.
const char * SbString::toLatin1 | ( | ) | const |
Returns the string as a Latin-1/ASCII C string.
long SbString::toLong | ( | SbBool * | ok = NULL | ) | const |
Returns the numeric value represented by the string.
Returns 0 if the conversion fails. Optional parameter ok is set to TRUE if the conversion was successful, else to FALSE.
short SbString::toShort | ( | SbBool * | ok = NULL | ) | const |
Returns the numeric value represented by the string.
Returns 0 if the conversion fails. Optional parameter ok is set to TRUE if the conversion was successful, else to FALSE.
std::string SbString::toStdString | ( | ) | const |
Returns the string as an STL string.
std::wstring SbString::toStdWString | ( | ) | const |
Returns the string as an STL wstring.
unsigned int SbString::toUInt | ( | SbBool * | ok = NULL | ) | const |
Returns the numeric value represented by the string.
Returns 0 if the conversion fails. Optional parameter ok is set to TRUE if the conversion was successful, else to FALSE.
unsigned long SbString::toULong | ( | SbBool * | ok = NULL | ) | const |
Returns the numeric value represented by the string.
Returns 0 if the conversion fails. Optional parameter ok is set to TRUE if the conversion was successful, else to FALSE.
unsigned short SbString::toUShort | ( | SbBool * | ok = NULL | ) | const |
Returns the numeric value represented by the string.
Returns 0 if the conversion fails. Optional parameter ok is set to TRUE if the conversion was successful, else to FALSE.
unsigned short * SbString::toUtf16 | ( | ) | const |
Returns the string as a UTF-16 string.
const wchar_t * SbString::toWideChar | ( | ) | const |
Returns the string as a wide char string.
SoNONUNICODE SbString & SbString::vprintf | ( | const char * | cformat, |
va_list | arg | ||
) |
Write into string using vprintf() syntax.
Non Unicode: This function should not be used in a Unicode application.
SoNONUNICODE const std::wstring & SbString::wgetSString | ( | ) | const |
Returns pointer to the stl::wstring.
SoNONUNICODE const SO_WCHAR_T * SbString::wgetString | ( | ) | const |
Returns pointer to the character string.
Inequality operator for char* / SbString comparison.
The inequality operator (!=) returns FALSE if its operands are equal, TRUE otherwise.
Non Unicode: This function should not be used in a Unicode application.
Inequality operator for SbString / char* comparison.
The inequality operator (!=) returns FALSE if its operands are equal, TRUE otherwise.
Non Unicode: This function should not be used in a Unicode application.
|
friend |
Inequality operator for SbString / wchar_t* comparison.
The inequality operator (!=) returns FALSE if its operands are equal, TRUE otherwise.
|
friend |
Inequality operator for wchar_t* / SbString comparison.
The inequality operator (!=) returns FALSE if its operands are equal, TRUE otherwise.
This is an overloaded member function, provided for convenience.
It behaves essentially like the above function.
Non Unicode: This function should not be used in a Unicode application.
This is an overloaded member function, provided for convenience.
It behaves essentially like the above function.
Non Unicode: This function should not be used in a Unicode application.
Returns a string which is the result of concatenating the string s1 and the string s2.
|
friend |
"less than" relational operator for char* / SbString that returns TRUE if the first operand is less than the second, FALSE otherwise.
Non Unicode: This function should not be used in a Unicode application.
|
friend |
"less than" relational operator for SbString / char* that returns TRUE if the first operand is less than the second, FALSE otherwise.
Non Unicode: This function should not be used in a Unicode application.
|
friend |
"less than" relational operator for SbString / wchar_t* that returns TRUE if the first operand is less than the second, FALSE otherwise.
|
friend |
"less than" relational operator for SbString / std::string that returns TRUE if the first operand is less than the second, FALSE otherwise.
Non Unicode: This function should not be used in a Unicode application.
|
friend |
"less than" relational operator for SbString / std::wstring that returns TRUE if the first operand is less than the second, FALSE otherwise.
"less than" relational operator for SbString
Returns TRUE if the first operand is less than the second, FALSE otherwise.
|
friend |
"less than" relational operator for wchar_t* / SbString that returns TRUE if the first operand is less than the second, FALSE otherwise.
|
friend |
"less than" relational operator for std::string / SbString that returns TRUE if the first operand is less than the second, FALSE otherwise.
Non Unicode: This function should not be used in a Unicode application.
|
friend |
"less than" relational operator for std::wstring / SbString that returns TRUE if the first operand is less than the second, FALSE otherwise.
|
friend |
Writes the string to the specified output stream.
Definition at line 594 of file SbString.h.
|
friend |
"less than or equal" relational operator for char* / SbString that returns TRUE if the first operand is less than or equal to the second, FALSE otherwise.
Non Unicode: This function should not be used in a Unicode application.
|
friend |
"less than or equal" relational operator for SbString / char* that returns TRUE if the first operand is less than or equal to the second, FALSE otherwise.
Non Unicode: This function should not be used in a Unicode application.
|
friend |
"less than or equal" relational operator for SbString / wchar_t* that returns TRUE if the first operand is less than or equal to the second, FALSE otherwise.
|
friend |
"less than or equal" relational operator for SbString / std::string that returns TRUE if the first operand is less than or equal to the second, FALSE otherwise.
Non Unicode: This function should not be used in a Unicode application.
|
friend |
"less than or equal" relational operator for SbString / std::wstring that returns TRUE if the first operand is less than or equal to the second, FALSE otherwise.
"less than or equal" relational operator for SbString
Returns TRUE if the first operand is less than or equal to the second, FALSE otherwise.
|
friend |
"less than or equal" relational operator for wchar_t* / SbString that returns TRUE if the first operand is less than or equal to the second, FALSE otherwise.
|
friend |
"less than or equal" relational operator for std::string / SbString that returns TRUE if the first operand is less than or equal to the second, FALSE otherwise.
Non Unicode: This function should not be used in a Unicode application.
|
friend |
"less than or equal" relational operator for std::wstring / SbString that returns TRUE if the first operand is less than or equal to the second, FALSE otherwise.
|
friend |
Equality operator for char* / SbString comparison.
The equality operator (==) returns TRUE if the values of its operands are equal, FALSE otherwise.
|
friend |
Equality operator for SbString / char* comparison.
The equality operator (==) returns TRUE if the values of its operands are equal, FALSE otherwise.
|
friend |
Equality operator for SbString / wchar_t* comparison.
The equality operator (==) returns TRUE if the values of its operands are equal, FALSE otherwise.
|
friend |
Equality operator for SbString / std::string comparison.
The equality operator (==) returns TRUE if the values of its operands are equal, FALSE otherwise.
Non Unicode: This function should not be used in a Unicode application.
|
friend |
Equality operator for SbString / std::wstring comparison.
The equality operator (==) returns TRUE if the values of its operands are equal, FALSE otherwise.
|
friend |
Equality operator for wchar_t* / SbString comparison.
The equality operator (==) returns TRUE if the values of its operands are equal, FALSE otherwise.
|
friend |
Equality operator for std::string / SbString comparison.
The equality operator (==) returns TRUE if the values of its operands are equal, FALSE otherwise.
Non Unicode: This function should not be used in a Unicode application.
|
friend |
Equality operator for std::wstring / SbString comparison.
The equality operator (==) returns TRUE if the values of its operands are equal, FALSE otherwise.
|
friend |
"greater than" relational operator for char* / SbString that returns TRUE if the first operand is greater than the second, FALSE otherwise.
Non Unicode: This function should not be used in a Unicode application.
|
friend |
"greater than" relational operator for SbString / char* that returns TRUE if the first operand is greater than the second, FALSE otherwise.
Non Unicode: This function should not be used in a Unicode application.
|
friend |
"greater than" relational operator for SbString/wchar_t* that returns TRUE if the first operand is greater than the second, FALSE otherwise.
|
friend |
"greater than" relational operator for SbString / std::string that returns TRUE if the first operand is greater than the second, FALSE otherwise.
Non Unicode: This function should not be used in a Unicode application.
|
friend |
"greater than" relational operator for SbString / std::wstring that returns TRUE if the first operand is greater than the second, FALSE otherwise.
"greater than" relational operator for SbString
Returns TRUE if the first operand is greater than the second, FALSE otherwise.
|
friend |
"greater than" relational operator for wchar_t* / SbString that returns TRUE if the first operand is greater than the second, FALSE otherwise.
|
friend |
"greater than" relational operator for std::string / SbString that returns TRUE if the first operand is greater than the second, FALSE otherwise.
Non Unicode: This function should not be used in a Unicode application.
|
friend |
"greater than" relational operator for std::wstring / SbString that returns TRUE if the first operand is greater than the second, FALSE otherwise.
|
friend |
"greater than or equal" relational operator for char* / SbString that returns TRUE if the first operand is greater than or equal to the second, FALSE otherwise.
Non Unicode: This function should not be used in a Unicode application.
|
friend |
"greater than or equal" relational operator for SbString / char* that returns TRUE if the first operand is greater than or equal to the second, FALSE otherwise.
Non Unicode: This function should not be used in a Unicode application.
|
friend |
"greater than or equal" relational operator for SbString / wchar_t* that returns TRUE if the first operand is greater than or equal to the second, FALSE otherwise.
|
friend |
"greater than or equal" relational operator for SbString / std::string that returns TRUE if the first operand is greater than or equal to the second, FALSE otherwise.
Non Unicode: This function should not be used in a Unicode application.
|
friend |
"greater than or equal" relational operator for SbString / std::wstring that returns TRUE if the first operand is greater than or equal to the second, FALSE otherwise.
"greater than or equal" relational operator for SbString
Returns TRUE if the first operand is greater than or equal to the second, FALSE otherwise.
|
friend |
"greater than or equal" relational operator for wchar_t* / SbString that returns TRUE if the first operand is greater than or equal to the second, FALSE otherwise.
|
friend |
"greater than or equal" relational operator for std::string / SbString that returns TRUE if the first operand is greater than or equal to the second, FALSE otherwise.
Non Unicode: This function should not be used in a Unicode application.
|
friend |
"greater than or equal" relational operator for std::wstring / SbString that returns TRUE if the first operand is greater than or equal to the second, FALSE otherwise.
|
static |
This constant is used to indicate when a find string action failed.
It defines a non-existing position.
Definition at line 259 of file SbString.h.