Tinker9 70bd052 (Thu Nov 9 12:11:35 2023 -0800)
Loading...
Searching...
No Matches
Classes

Classes

class  tinker::Text
 Plain ascii text stored by lines. More...
 

Detailed Description


Class Documentation

◆ tinker::Text

class tinker::Text

Plain ascii text stored by lines.

Static Public Member Functions

static bool isWhiteSpace (char ch)
 Returns true if ch is one of the white space characters. More...
 
template<size_t Len>
static std::string string (const char(&src)[Len])
 Returns an std::string object from a c-style char array. More...
 
static void replace (std::string &src, std::string old, char r)
 In string src, replaces all characters in old to r. More...
 
static std::vector< std::string > split (std::string str, std::string delimiters=whitespaces)
 Splits a string str by delimiters and returns a vector of strings. More...
 
static void upcase (std::string &s)
 Transforms a string to upper case. More...
 
static void lowcase (std::string &s)
 Transforms a string to lower case. More...
 

Static Public Attributes

static constexpr const char * whitespaces = " \t\n\v\f\r"
 White space characters. More...
 

Member Function Documentation

◆ isWhiteSpace()

static bool tinker::Text::isWhiteSpace ( char  ch)
static

Returns true if ch is one of the white space characters.

◆ lowcase()

static void tinker::Text::lowcase ( std::string &  s)
static

Transforms a string to lower case.

◆ replace()

static void tinker::Text::replace ( std::string &  src,
std::string  old,
char  r 
)
static

In string src, replaces all characters in old to r.

◆ split()

static std::vector< std::string > tinker::Text::split ( std::string  str,
std::string  delimiters = whitespaces 
)
static

Splits a string str by delimiters and returns a vector of strings.

◆ string()

template<size_t Len>
static std::string tinker::Text::string ( const char(&)  src[Len])
inlinestatic

Returns an std::string object from a c-style char array.

◆ upcase()

static void tinker::Text::upcase ( std::string &  s)
static

Transforms a string to upper case.

Member Data Documentation

◆ whitespaces

constexpr const char* tinker::Text::whitespaces = " \t\n\v\f\r"
staticconstexpr

White space characters.