Provided by: inventor-doc_2.1.5-10+dfsg-1_all
NAME
SbString — class for smart character strings
INHERITS FROM
SbString
SYNOPSIS
#include <Inventor/SbString.h> Methods from class SbString: SbString() SbString(const char *str) SbString(const char *str, int start, int end) SbString(const SbString &str) SbString(int digitString) ~SbString() uint32_t hash() int getLength() const void makeEmpty(SbBool freeOld = TRUE) const char * getString() const SbString getSubString(int startChar, int endChar = -1) const void deleteSubString(int startChar, int endChar = -1) SbString & operator =(const char *str) SbString & operator =(const SbString &str) SbString & operator +=(const char *str) SbString & operator +=(const SbString &str) int operator !() const int operator ==(const char *s, const SbString &str) int operator ==(const SbString &str, const char *s) int operator ==(const SbString &str1, const SbString &str2) int operator !=(const char *s, const SbString &str) int operator !=(const SbString &str, const char *s) int operator !=(const SbString &str1, const SbString &str2)
DESCRIPTION
Strings which have many convenience methods to make string manipulation easier.
METHODS
SbString() SbString(const char *str) SbString(const char *str, int start, int end) SbString(const SbString &str) SbString(int digitString) ~SbString() Constructors and destructor. Constructors take a character string, the subset of a character string from start to end (inclusive), or an integer to be turned into a string. For example, SbString(1234) creates the string "1234". SbString("Testing",1,3) creates the string "est". uint32_t hash() Returns a reasonable hash key for string. int getLength() const Returns length of string. void makeEmpty(SbBool freeOld = TRUE) Sets string to be the empty string (""). If freeOld is TRUE (default), any old storage is freed up. const char * getString() const Returns pointer to the character string. SbString getSubString(int startChar, int endChar = -1) const Returns new string representing sub-string from startChar to endChar, inclusive. If endChar is -1 (the default), the sub-string from startChar until the end is returned. void 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. SbString & operator =(const char *str) SbString & operator =(const SbString &str) Assignment operators for character string, SbString. SbString & operator +=(const char *str) SbString & operator +=(const SbString &str) Concatenation operators "+=" for string, SbString. int operator !() const Unary "not" operator; returns TRUE if string is empty (""). int operator ==(const char *s, const SbString &str) int operator ==(const SbString &str, const char *s) int operator ==(const SbString &str1, const SbString &str2) Equality operator for SbString/char* and SbString/SbString comparison. int operator !=(const char *s, const SbString &str) int operator !=(const SbString &str, const char *s) int operator !=(const SbString &str1, const SbString &str2) Inequality operator for SbString/char* and SbString/SbString comparison.
SEE ALSO
SbName SbString(3IV)()