Web Analytics Made Easy - Statcounter
Skip to content

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 .

SBCContainerString::SBCContainerString (
    std::string s
) 


function SBCContainerString [2/4]#

Constructs a string from a char array s .

SBCContainerString::SBCContainerString (
    char * s
) 


function SBCContainerString [3/4]#

Copy constructor.

SBCContainerString::SBCContainerString (
    const SBCContainerString & s
) 


function SBCContainerString [4/4]#

Move constructor.

SBCContainerString::SBCContainerString (
    SBCContainerString && s
) 


function operator=#

Copy assignment operator.

SBCContainerString & SBCContainerString::operator= (
    const SBCContainerString & s
) 


function operator=#

Move assignment operator.

SBCContainerString & SBCContainerString::operator= (
    SBCContainerString && s
) 


function print#

Prints some debugging information.

void SBCContainerString::print () const


function removeWhiteSpaces [1/2]#

Removes white spaces from the string.

void SBCContainerString::removeWhiteSpaces () 


function ~SBCContainerString#

Destructs the string.

virtual SBCContainerString::~SBCContainerString () 


Public Static Functions Documentation#

function removeWhiteSpaces [2/2]#

Removes white spaces from the input string.

static std::string SBCContainerString::removeWhiteSpaces (
    std::string t
)