Class SBCContainerString#
ClassList > SBCContainerString
This class describes a string. More...
#include "SBCContainerString.hpp"
Public Functions#
| Type | Name |
|---|---|
| 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. |
|
| SBCContainerString & | operator= (const SBCContainerString & s) Copy assignment operator. |
| SBCContainerString & | operator= (SBCContainerString && s) Move assignment operator. |
| void | print () const Prints some debugging information. |
| void | removeWhiteSpaces () Removes white spaces from the string. |
| virtual | ~SBCContainerString () Destructs the string. |
Public Static Functions#
| Type | Name |
|---|---|
| std::string | removeWhiteSpaces (std::string t) 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
Public Functions Documentation#
function SBCContainerString [1/4]#
Constructs a string from a std::string s .
function SBCContainerString [2/4]#
Constructs a string from a char array s .
function SBCContainerString [3/4]#
Copy constructor.
function SBCContainerString [4/4]#
Move constructor.
function operator=#
Copy assignment operator.
function operator=#
Move assignment operator.
function print#
Prints some debugging information.
function removeWhiteSpaces [1/2]#
Removes white spaces from the string.
function ~SBCContainerString#
Destructs the string.
Public Static Functions Documentation#
function removeWhiteSpaces [2/2]#
Removes white spaces from the input string.