SbString Class Reference
[Basics]

Class for smart character strings. More...

#include <Inventor/SbString.h>

List of all members.

Public Member Functions

 SbString ()
 SbString (const std::string &std_string)
 SbString (const std::wstring &std_wstring)
 SbString (const char *str)
 SbString (const char *str, int start, int end)
 SbString (const wchar_t *str, int start, int end)
 SbString (const SbString &str)
 SbString (const wchar_t *str)
 ~SbString ()
SbBool isEmpty () const
SbBool isNull () const
int getLength () const
void makeEmpty (const SbBool freeOld=TRUE)
void makeNull ()
SbString getSubString (int startChar, int endChar=-1) const
void deleteSubString (int startChar, int endChar=-1)
SbBool contains (const SbString &str) const
bool endsWith (const SbString &str) const
int find (const SbString &str) const
int rfind (const SbString &str) const
int findLast (const SbString &str) const
SbBool containsAny (const SbString &str) const
int findAny (const SbString &str) const
void replace (const SbString &patternStr, const SbString &substStr)
SbString lower () const
SbString upper () const
SbStringsetNum (short value, int base=10)
SbStringsetNum (unsigned short value, int base=10)
SbStringsetNum (int value, int base=10)
SbStringsetNum (unsigned int value, int base=10)
SbStringsetNum (long value, int base=10)
SbStringsetNum (unsigned long value, int base=10)
SbStringsetNum (double value)
SbStringsetNum (float value)
unsigned short toUShort (SbBool *ok=NULL) const
short toShort (SbBool *ok=NULL) const
unsigned int toUInt (SbBool *ok=NULL) const
int toInt (SbBool *ok=NULL) const
unsigned long toULong (SbBool *ok=NULL) const
long toLong (SbBool *ok=NULL) const
float toFloat (SbBool *ok=NULL) const
double toDouble (SbBool *ok=NULL) const
SbBool isUnicode () const
SbStringfromLatin1 (const char *str)
SbStringfromUtf16 (const unsigned short *str)
SbStringfromWideChar (const wchar_t *str)
const char * toLatin1 () const
unsigned short * toUtf16 () const
const wchar_t * toWideChar () const
std::wstring toStdWString () const
std::string toStdString () const
SbStringoperator+= (const SbString &str)
SbStringoperator+= (const char *str)
SbStringoperator= (const SbString &str)
SbStringoperator= (const char *str)
uint32_t hash () const
SoNONUNICODE SbString (const int digitString)
SoNONUNICODE const char * getString () const
SoNONUNICODE const std::string & getSString () const
SoNONUNICODE SbStringsprintf (const char *cformat,...)
SoNONUNICODE SbStringvprintf (const char *cformat, va_list arg)
SoNONUNICODE char operator[] (int i) const
SoNONUNICODE int operator! () const
SoNONUNICODE const SO_WCHAR_T * wgetString () const
SoNONUNICODE const std::wstring & wgetSString () const
SoNONUNICODE SbStringoperator= (const SO_WCHAR_T *str)
SoNONUNICODE SbStringoperator+= (const SO_WCHAR_T *str)

Static Public Attributes

static const int npos

Friends

const SbString operator+ (const SbString &s1, const SbString &s2)
int operator== (const SbString &str1, const SbString &str2)
int operator== (const SbString &str, const char *s)
int operator== (const char *s, const SbString &str)
int operator!= (const SbString &str1, const SbString &str2)
bool operator< (const SbString &str1, const SbString &str2)
bool operator> (const SbString &str1, const SbString &str2)
bool operator<= (const SbString &str1, const SbString &str2)
bool operator>= (const SbString &str1, const SbString &str2)
std::ostream & operator<< (std::ostream &os, const SbString &str)
SoNONUNICODE friend const SbString operator+ (const SbString &s1, const char *s2)
SoNONUNICODE friend const SbString operator+ (const char *s1, const SbString &s2)
SoNONUNICODE friend int operator== (const SbString &str, const std::string &s)
SoNONUNICODE friend int operator== (const std::string &s, const SbString &str)
SoNONUNICODE friend int operator!= (const SbString &str, const char *s)
SoNONUNICODE friend int operator!= (const char *s, const SbString &str)
SoNONUNICODE friend bool operator< (const SbString &str, const char *s)
SoNONUNICODE friend bool operator< (const char *s, const SbString &str)
SoNONUNICODE friend bool operator< (const SbString &str, const std::string &s)
SoNONUNICODE friend bool operator< (const std::string &s, const SbString &str)
SoNONUNICODE friend bool operator> (const SbString &str, const char *s)
SoNONUNICODE friend bool operator> (const char *s, const SbString &str)
SoNONUNICODE friend bool operator> (const SbString &str, const std::string &s)
SoNONUNICODE friend bool operator> (const std::string &s, const SbString &str)
SoNONUNICODE friend bool operator<= (const SbString &str, const char *s)
SoNONUNICODE friend bool operator<= (const char *s, const SbString &str)
SoNONUNICODE friend bool operator<= (const SbString &str, const std::string &s)
SoNONUNICODE friend bool operator<= (const std::string &s, const SbString &str)
SoNONUNICODE friend bool operator>= (const SbString &str, const char *s)
SoNONUNICODE friend bool operator>= (const char *s, const SbString &str)
SoNONUNICODE friend bool operator>= (const SbString &str, const std::string &s)
SoNONUNICODE friend bool operator>= (const std::string &s, const SbString &str)
SoNONUNICODE friend int operator== (const SbString &str, const SO_WCHAR_T *s)
SoNONUNICODE friend int operator== (const SO_WCHAR_T *s, const SbString &str)
SoNONUNICODE friend int operator== (const SbString &str, const std::wstring &s)
SoNONUNICODE friend int operator== (const std::wstring &s, const SbString &str)
SoNONUNICODE friend int operator!= (const SbString &str, const SO_WCHAR_T *s)
SoNONUNICODE friend int operator!= (const SO_WCHAR_T *s, const SbString &str)
SoNONUNICODE friend bool operator< (const SbString &str, const SO_WCHAR_T *s)
SoNONUNICODE friend bool operator< (const SO_WCHAR_T *s, const SbString &str)
SoNONUNICODE friend bool operator< (const SbString &str, const std::wstring &s)
SoNONUNICODE friend bool operator< (const std::wstring &s, const SbString &str)
SoNONUNICODE friend bool operator> (const SbString &str, const SO_WCHAR_T *s)
SoNONUNICODE friend bool operator> (const SO_WCHAR_T *s, const SbString &str)
SoNONUNICODE friend bool operator> (const SbString &str, const std::wstring &s)
SoNONUNICODE friend bool operator> (const std::wstring &s, const SbString &str)
SoNONUNICODE friend bool operator<= (const SbString &str, const SO_WCHAR_T *s)
SoNONUNICODE friend bool operator<= (const SO_WCHAR_T *s, const SbString &str)
SoNONUNICODE friend bool operator<= (const SbString &str, const std::wstring &s)
SoNONUNICODE friend bool operator<= (const std::wstring &s, const SbString &str)
SoNONUNICODE friend bool operator>= (const SbString &str, const SO_WCHAR_T *s)
SoNONUNICODE friend bool operator>= (const SO_WCHAR_T *s, const SbString &str)
SoNONUNICODE friend bool operator>= (const SbString &str, const std::wstring &s)
SoNONUNICODE friend bool operator>= (const std::wstring &s, const SbString &str)

Detailed Description

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:

EXAMPLE

SEE ALSO

SbName, SbFileHelper, SbStringList

See related examples:

DirectUnicode


Constructor & Destructor Documentation

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 SbString str  ) 

Constructor that takes an SbString.

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 List:
This function should not be used in a Unicode application. Use the setNum() methods instead.

Member Function Documentation

SbBool SbString::contains ( const SbString str  )  const

Returns TRUE if the string contains the specified substring.

SbBool SbString::containsAny ( const SbString str  )  const

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 List:
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 List:
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.

SbBool SbString::isEmpty (  )  const [inline]

Returns TRUE if the string is empty.


i.e. if length() == 0; otherwise returns FALSE. Null strings are also empty. See makeEmpty().

SbBool SbString::isNull (  )  const [inline]

Returns TRUE if the string is a null string.


A null string has never been initialized. See makeNull().

SbBool SbString::isUnicode (  )  const

Returns TRUE if the string contains Unicode characters.

SbString SbString::lower (  )  const

Returns a lowercase copy of the string.


See also: upper()

void SbString::makeEmpty ( const SbBool  freeOld = TRUE  ) 

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 List:
This function should not be used in a Unicode application.
SoNONUNICODE SbString& SbString::operator+= ( const SO_WCHAR_T *  str  ) 

Concatenation operator "+=" for SbString.

SbString& SbString::operator+= ( const char *  str  ) 

Concatenation operator "+=" for string, SbString.

SbString& SbString::operator+= ( const SbString str  ) 

Concatenation operator "+=" for SbString, SbString.

SoNONUNICODE SbString& SbString::operator= ( const SO_WCHAR_T *  str  ) 

Assignment operator for character string, SbString.

SbString& SbString::operator= ( const char *  str  ) 

Assignment operator for character string.

SbString& SbString::operator= ( const SbString str  ) 

Assignment operator for 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 List:
This function should not be used in a Unicode application.
void SbString::replace ( const SbString patternStr,
const SbString substStr 
)

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 ( float  value  ) 

Sets the string to a formatted numeric value.

SbString& SbString::setNum ( double  value  ) 

Sets the string to a formatted numeric value.

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:

  • 2 : Formatted using "%b" (Windows only)
  • 8 : Formatted using "%o"
  • 10 : Formatted using "%d"
  • 16 : Formatted using "0x%x"

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:

  • 2 : Formatted using "%b" (Windows only)
  • 8 : Formatted using "%o"
  • 10 : Formatted using "%d"
  • 16 : Formatted using "0x%x"

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:

  • 2 : Formatted using "%b" (Windows only)
  • 8 : Formatted using "%o"
  • 10 : Formatted using "%d"
  • 16 : Formatted using "0x%x"

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:

  • 2 : Formatted using "%b" (Windows only)
  • 8 : Formatted using "%o"
  • 10 : Formatted using "%d"
  • 16 : Formatted using "0x%x"

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:

  • 2 : Formatted using "%b" (Windows only)
  • 8 : Formatted using "%o"
  • 10 : Formatted using "%d"
  • 16 : Formatted using "0x%x"

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:

  • 2 : Formatted using "%b" (Windows only)
  • 8 : Formatted using "%o"
  • 10 : Formatted using "%d"
  • 16 : Formatted using "0x%x"
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 List:
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.

SbString SbString::upper (  )  const

Returns an uppercase copy of the string.


See also: lower()

SoNONUNICODE SbString& SbString::vprintf ( const char *  cformat,
va_list  arg 
)

Write into string using vprintf() syntax.

Non Unicode List:
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.


Friends And Related Function Documentation

SoNONUNICODE friend int operator!= ( const SO_WCHAR_T *  s,
const SbString str 
) [friend]

Inequality operator for wchar_t* / SbString comparison.

The inequality operator (!=) returns FALSE if its operands are equal, TRUE otherwise.

SoNONUNICODE friend int operator!= ( const SbString str,
const SO_WCHAR_T *  s 
) [friend]

Inequality operator for SbString / wchar_t* comparison.

The inequality operator (!=) returns FALSE if its operands are equal, TRUE otherwise.

SoNONUNICODE friend int operator!= ( const char *  s,
const SbString str 
) [friend]

Inequality operator for char* / SbString comparison.


The inequality operator (!=) returns FALSE if its operands are equal, TRUE otherwise.

Non Unicode List:
This function should not be used in a Unicode application.
SoNONUNICODE friend int operator!= ( const SbString str,
const char *  s 
) [friend]

Inequality operator for SbString / char* comparison.


The inequality operator (!=) returns FALSE if its operands are equal, TRUE otherwise.

Non Unicode List:
This function should not be used in a Unicode application.
int operator!= ( const SbString str1,
const SbString str2 
) [friend]

Inequality operator for SbString / SbString comparison.


The inequality operator (!=) returns FALSE if its operands are equal, TRUE otherwise.

SoNONUNICODE friend const SbString operator+ ( const char *  s1,
const SbString s2 
) [friend]

This is an overloaded member function, provided for convenience.

It behaves essentially like the above function.

Non Unicode List:
This function should not be used in a Unicode application.
SoNONUNICODE friend const SbString operator+ ( const SbString s1,
const char *  s2 
) [friend]

This is an overloaded member function, provided for convenience.

It behaves essentially like the above function.

Non Unicode List:
This function should not be used in a Unicode application.
const SbString operator+ ( const SbString s1,
const SbString s2 
) [friend]

Returns a string which is the result of concatenating the string s1 and the string s2.

SoNONUNICODE friend bool operator< ( const std::wstring &  s,
const SbString str 
) [friend]

"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 std::wstring &  s 
) [friend]

"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 SO_WCHAR_T *  s,
const SbString str 
) [friend]

"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 SO_WCHAR_T *  s 
) [friend]

"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 std::string &  s,
const SbString str 
) [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 List:
This function should not be used in a Unicode application.
SoNONUNICODE friend bool operator< ( const SbString str,
const std::string &  s 
) [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 List:
This function should not be used in a Unicode application.
SoNONUNICODE friend bool operator< ( const char *  s,
const SbString str 
) [friend]

"less than" relational operator for char* / SbString that returns TRUE if the first operand is less than the second, FALSE otherwise.

Non Unicode List:
This function should not be used in a Unicode application.
SoNONUNICODE friend bool operator< ( const SbString str,
const char *  s 
) [friend]

"less than" relational operator for SbString / char* that returns TRUE if the first operand is less than the second, FALSE otherwise.

Non Unicode List:
This function should not be used in a Unicode application.
bool operator< ( const SbString str1,
const SbString str2 
) [friend]

"less than" relational operator for SbString
Returns TRUE if the first operand is less than the second, FALSE otherwise.

std::ostream& operator<< ( std::ostream &  os,
const SbString str 
) [friend]

Writes the string to the specified output stream.

SoNONUNICODE friend bool operator<= ( const std::wstring &  s,
const SbString str 
) [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.

SoNONUNICODE friend bool operator<= ( const SbString str,
const std::wstring &  s 
) [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.

SoNONUNICODE friend bool operator<= ( const SO_WCHAR_T *  s,
const SbString str 
) [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.

SoNONUNICODE friend bool operator<= ( const SbString str,
const SO_WCHAR_T *  s 
) [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.

SoNONUNICODE friend bool operator<= ( const std::string &  s,
const SbString str 
) [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 List:
This function should not be used in a Unicode application.
SoNONUNICODE friend bool operator<= ( const SbString str,
const std::string &  s 
) [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 List:
This function should not be used in a Unicode application.
SoNONUNICODE friend bool operator<= ( const char *  s,
const SbString str 
) [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 List:
This function should not be used in a Unicode application.
SoNONUNICODE friend bool operator<= ( const SbString str,
const char *  s 
) [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 List:
This function should not be used in a Unicode application.
bool operator<= ( const SbString str1,
const SbString str2 
) [friend]

"less than or equal" relational operator for SbString
Returns TRUE if the first operand is less than or equal to the second, FALSE otherwise.

SoNONUNICODE friend int operator== ( const std::wstring &  s,
const SbString str 
) [friend]

Equality operator for std::wstring / SbString comparison.

The equality operator (==) returns TRUE if the values of its operands are equal, FALSE otherwise.

SoNONUNICODE friend int operator== ( const SbString str,
const std::wstring &  s 
) [friend]

Equality operator for SbString / std::wstring comparison.

The equality operator (==) returns TRUE if the values of its operands are equal, FALSE otherwise.

SoNONUNICODE friend int operator== ( const SO_WCHAR_T *  s,
const SbString str 
) [friend]

Equality operator for wchar_t* / SbString comparison.

The equality operator (==) returns TRUE if the values of its operands are equal, FALSE otherwise.

SoNONUNICODE friend int operator== ( const SbString str,
const SO_WCHAR_T *  s 
) [friend]

Equality operator for SbString / wchar_t* comparison.

The equality operator (==) returns TRUE if the values of its operands are equal, FALSE otherwise.

SoNONUNICODE friend int operator== ( const std::string &  s,
const SbString str 
) [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 List:
This function should not be used in a Unicode application.
SoNONUNICODE friend int operator== ( const SbString str,
const std::string &  s 
) [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 List:
This function should not be used in a Unicode application.
int operator== ( const char *  s,
const SbString str 
) [friend]

Equality operator for char* / SbString comparison.


The equality operator (==) returns TRUE if the values of its operands are equal, FALSE otherwise.

int operator== ( const SbString str,
const char *  s 
) [friend]

Equality operator for SbString / char* comparison.


The equality operator (==) returns TRUE if the values of its operands are equal, FALSE otherwise.

int operator== ( const SbString str1,
const SbString str2 
) [friend]

Equality operator for SbString / SbString comparison.


The equality operator (==) returns TRUE if the values of its operands are equal, FALSE otherwise.

SoNONUNICODE friend bool operator> ( const std::wstring &  s,
const SbString str 
) [friend]

"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 std::wstring &  s 
) [friend]

"greater than" relational operator for SbString/stdwstring 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 
) [friend]

"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 SO_WCHAR_T *  s 
) [friend]

"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 std::string &  s,
const SbString str 
) [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 List:
This function should not be used in a Unicode application.
SoNONUNICODE friend bool operator> ( const SbString str,
const std::string &  s 
) [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 List:
This function should not be used in a Unicode application.
SoNONUNICODE friend bool operator> ( const char *  s,
const SbString str 
) [friend]

"greater than" relational operator for char* / SbString that returns TRUE if the first operand is greater than the second, FALSE otherwise.

Non Unicode List:
This function should not be used in a Unicode application.
SoNONUNICODE friend bool operator> ( const SbString str,
const char *  s 
) [friend]

"greater than" relational operator for SbString / char* that returns TRUE if the first operand is greater than the second, FALSE otherwise.

Non Unicode List:
This function should not be used in a Unicode application.
bool operator> ( const SbString str1,
const SbString str2 
) [friend]

"greater than" relational operator for SbString
Returns TRUE if the first operand is greater than the second, FALSE otherwise.

SoNONUNICODE friend bool operator>= ( const std::wstring &  s,
const SbString str 
) [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.

SoNONUNICODE friend bool operator>= ( const SbString str,
const std::wstring &  s 
) [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.

SoNONUNICODE friend bool operator>= ( const SO_WCHAR_T *  s,
const SbString str 
) [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.

SoNONUNICODE friend bool operator>= ( const SbString str,
const SO_WCHAR_T *  s 
) [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.

SoNONUNICODE friend bool operator>= ( const std::string &  s,
const SbString str 
) [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 List:
This function should not be used in a Unicode application.
SoNONUNICODE friend bool operator>= ( const SbString str,
const std::string &  s 
) [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 List:
This function should not be used in a Unicode application.
SoNONUNICODE friend bool operator>= ( const char *  s,
const SbString str 
) [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 List:
This function should not be used in a Unicode application.
SoNONUNICODE friend bool operator>= ( const SbString str,
const char *  s 
) [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 List:
This function should not be used in a Unicode application.
bool operator>= ( const SbString str1,
const SbString str2 
) [friend]

"greater than or equal" relational operator for SbString
Returns TRUE if the first operand is greater than or equal to the second, FALSE otherwise.


Member Data Documentation

const int SbString::npos [static]

This constant is used to indicate when a find string action failed.

It defines a non-existing position.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/