Loading...
Searching...
No Matches

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.
 
 SBCContainerString (SBCContainerString &&s)
 Move constructor.
 
virtual ~SBCContainerString ()
 Destructs the string.
 
SBCContainerStringoperator= (const SBCContainerString &s)
 Copy assignment operator.
 
SBCContainerStringoperator= (SBCContainerString &&s)
 Move 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"
This class describes a string.
Definition: SBCContainerString.hpp:31
void removeWhiteSpaces()
Removes white spaces from the string.
Definition: SBCContainerString.cpp:40

Short name: SBString