This class describes a string. More...

Public Member Functions

 SBCContainerString (std::string s)
 Constructs a string from a std::string s.
 
 SBCContainerString (char *s)
 Constructs a string from a char array s.
 
 SBCContainerString (const SBCContainerString &s)
 Copy constructor.
 
virtual ~SBCContainerString ()
 Destructs the string.
 
SBCContainerStringoperator= (const SBCContainerString &s)
 Assignment operator.
 
void removeWhiteSpaces ()
 Removes white spaces from the string.
 
void print () const
 Prints some debugging information.
 

Static Public Member Functions

static std::string removeWhiteSpaces (std::string)
 Removes white spaces from the input string.
 

Detailed Description

SBCContainerString is a simple class that encapsulates a std::string. Its initial purpose was to provide a simple way to remove white spaces in a string:

// non-static version
SBString s("Hello World");
s.removeWhiteSpaces(); // s becomes "HelloWorld"
// static version (does not modify the input)
std::string s("Hello World");
std::string r = SBString::removeWhiteSpaces(s); // r is "HelloWorld"

Short name: SBString