|
Sierra Toolkit
Version of the Day
|
Classes | |
| class | sierra::object_phrase |
| Class object_phrase makes a pretty string for those annoying plural or singular noun/verb phrases. More... | |
| struct | sierra::less_nocase< T > |
| Class less_nocase implements a case insensitive compare functor. More... | |
| struct | sierra::less_nocase< String > |
| Class specialization less_nocase for String. More... | |
| struct | sierra::less_nocase< std::string > |
| Class specialization less_nocase for std::string. More... | |
| struct | sierra::less_nocase< const char * > |
| Class specialization less_nocase for char const pointer. More... | |
| struct | sierra::equal_nocase< T > |
| Class equal_nocase implements a case insensitive compare functor. More... | |
| struct | sierra::equal_nocase< String > |
| Class specialization equal_nocase for String. More... | |
| struct | sierra::equal_nocase< std::string > |
| Class specialization equal_nocase for std::string. More... | |
| struct | sierra::equal_nocase< const char * > |
| Class specialization equal_nocase for char const pointer. More... | |
| struct | sierra::hash_nocase< _Key > |
| Class hash_nocase is a traits class for hash functions. More... | |
| struct | sierra::hash_nocase< std::string > |
| Class specialization hash_nocase for std::string. More... | |
| struct | sierra::hash_nocase< String > |
| Class specialization hash_nocase for String. More... | |
Functions | |
| int | sierra::case_strcmp (const char *c1, const char *c2) |
| Function case_strcmp compares two null terminated strings case insenstively. It returns zero if they are case insensitively equal, a negative value if c1 is case insensitively less than c2, or a positive value if c1 is case insensitively greater than c2 | |
| int | sierra::case_strncmp (const char *c1, const char *c2, size_t n) |
| int | sierra::case_strcmp (const std::string &s1, const std::string &s2) |
| Function case_strcmp compares two null terminated strings case insenstively. It returns zero if they are case insensitively equal, a negative value if s1 is case insensitively less than s2, or a positive value if s1 is case insensitively greater than s2 | |
| int | sierra::case_strcmp (const String &s1, const String &s2) |
| Function case_strcmp compares two null terminated strings case insenstively. It returns zero if they are case insensitively equal, a negative value if s1 is case insensitively less than s2, or a positive value if s1 is case insensitively greater than s2 | |
| const char * | sierra::case_strstr (const char *s, const char *find) |
| const char * | sierra::case_strstr (const std::string &s1, const std::string &s2) |
| const char * | sierra::case_strstr (const String &s1, const String &s2) |
| String | sierra::undef_if_empty (const String &s) |
| int | sierra::to_upper (int c) |
| Function to_upper returns the value converted to upper case. | |
| int | sierra::to_lower (int c) |
| Function to_lower returns the value converted to lower case. | |
| int | sierra::to_identifier_upper (int c) |
| Function to_identifier_upper returns the value converted to underscore if it is a space or to upper case. | |
| int | sierra::to_identifier_lower (int c) |
| Function to_identifier_lower returns the value converted to underscore if it is a space or to lower case. | |
| template<class T > | |
| T & | sierra::make_upper (T &name) |
| Function make_upper converts strgin name to upper case. The conversion happens in place. | |
| template<class T > | |
| T & | sierra::make_lower (T &name) |
| Function make_lower converts string name to lower case. The convertion happens in place. | |
| template<class T > | |
| T & | sierra::make_identifier (T &name) |
| Function make_identifier converts string name to an identifier case. The convertion happens in place. | |
| template<class T > | |
| T & | sierra::make_lower_identifier (T &name) |
| Function make_lower_identifier converts string name to a lower case identifier case. The convertion happens in place. | |
| char * | sierra::make_identifier (char *name) |
| Function make_identifier converts string name to an identifier case. The convertion happens in place. | |
| char * | sierra::make_lower_identifier (char *name) |
| Function make_lower_identifier converts string name to a lower case identifier case. The convertion happens in place. | |
| template<class T > | |
| T & | sierra::trim (T &name) |
| Function trim trims preceeding and trailing spaces from name. The convertion happens in place. | |
| std::string | sierra::title (const std::string &s) |
| Function title returns a first letter of each word capitalized of the string. | |
| std::string | sierra::title (const String &s) |
| String | sierra::lower (const String &s) |
| Function lower returns a lower case version of the string. | |
| std::string | sierra::to_string (const double &r, int precision=4) |
| Function to_string returns a string representation of r. | |
| std::string | sierra::to_string (const float &r, int precision=4) |
| Function to_string returns a string representation of r. | |
| template<typename T > | |
| std::string | sierra::to_string (const T &t) |
| const char * | sierra::demangle (const char *symbol) |
| Function demangle returns the demangled C++ symbol from the mangled C++ symbol. The mangled named is obtained from the type_info name() function. From some compilers, the name is already demangled. | |
| std::string | sierra::format_time (double t, const char *format="%b %e %Y %H:%M:%S") |
| Function format_time encodes the time using the format specified. The format is described in stdftime. | |
| std::string | sierra::word_wrap (const std::string &s, unsigned int line_length, const std::string &prefix, const std::string &prefix_first_line) |
| Function word_wrap reformats a string into multiple lines, none longer that line_length, the first line prefixed with prefix_first_line and the remaining lines prefixed with prefix. | |
| std::string | sierra::word_wrap (const std::string &s, unsigned int line_length=72, const std::string &prefix="") |
| Function word_wrap reformats a string into multiple lines, none longer that line_length and each line prefixed with prefix. | |
| std::ostream & | sierra::operator<< (std::ostream &os, const object_phrase &phrase) |
| Function operator<< writes an object phrase to the output stream. | |
| std::istream & | sierra::getline (std::istream &is, sierra::String &s, char eol= '\n') |
| Function getline returns a string from the input stream which has been terminated by the newline character. | |
| size_t | sierra::hash_string_nocase (const char *p) |
| Function hash_string_nocase hash a character string case insensitively. | |
| int sierra::case_strcmp | ( | const char * | c1, |
| const char * | c2 | ||
| ) |
Function case_strcmp compares two null terminated strings case insenstively. It returns zero if they are case insensitively equal, a negative value if c1 is case insensitively less than c2, or a positive value if c1 is case insensitively greater than c2
| c1 | a char const pointer to the first string. |
| c2 | a char const pointer to the second string. |
Definition at line 47 of file StringUtil.cpp.
| int sierra::case_strcmp | ( | const std::string & | s1, |
| const std::string & | s2 | ||
| ) | [inline] |
Function case_strcmp compares two null terminated strings case insenstively. It returns zero if they are case insensitively equal, a negative value if s1 is case insensitively less than s2, or a positive value if s1 is case insensitively greater than s2
| s1 | a std::string reference to the first string. |
| s2 | a std::string reference to the second string. |
Definition at line 52 of file StringUtil.hpp.
| int sierra::case_strcmp | ( | const String & | s1, |
| const String & | s2 | ||
| ) | [inline] |
Function case_strcmp compares two null terminated strings case insenstively. It returns zero if they are case insensitively equal, a negative value if s1 is case insensitively less than s2, or a positive value if s1 is case insensitively greater than s2
Definition at line 70 of file StringUtil.hpp.
| int sierra::to_upper | ( | int | c | ) | [inline] |
Function to_upper returns the value converted to upper case.
| c | an int value to be converted. |
Definition at line 105 of file StringUtil.hpp.
| int sierra::to_lower | ( | int | c | ) | [inline] |
Function to_lower returns the value converted to lower case.
| c | an int value to be converted |
Definition at line 116 of file StringUtil.hpp.
| int sierra::to_identifier_upper | ( | int | c | ) | [inline] |
Function to_identifier_upper returns the value converted to underscore if it is a space or to upper case.
| c | an int value to be converted |
Definition at line 128 of file StringUtil.hpp.
| int sierra::to_identifier_lower | ( | int | c | ) | [inline] |
Function to_identifier_lower returns the value converted to underscore if it is a space or to lower case.
| c | an int value to be converted |
Definition at line 140 of file StringUtil.hpp.
| T& sierra::make_upper | ( | T & | name | ) | [inline] |
Function make_upper converts strgin name to upper case. The conversion happens in place.
| name | a T reference to convert to a upper case. |
Definition at line 153 of file StringUtil.hpp.
| T& sierra::make_lower | ( | T & | name | ) | [inline] |
Function make_lower converts string name to lower case. The convertion happens in place.
| name | a T reference to convert to an lower. |
Definition at line 168 of file StringUtil.hpp.
| T& sierra::make_identifier | ( | T & | name | ) | [inline] |
Function make_identifier converts string name to an identifier case. The convertion happens in place.
| name | a T reference to convert to an identifier. |
Definition at line 183 of file StringUtil.hpp.
| T& sierra::make_lower_identifier | ( | T & | name | ) | [inline] |
Function make_lower_identifier converts string name to a lower case identifier case. The convertion happens in place.
| name | a T reference to convert to a lower case identifier. |
Definition at line 199 of file StringUtil.hpp.
| char* sierra::make_identifier | ( | char * | name | ) | [inline] |
Function make_identifier converts string name to an identifier case. The convertion happens in place.
| name | a char pointer to convert to an identifier. |
Definition at line 213 of file StringUtil.hpp.
| char* sierra::make_lower_identifier | ( | char * | name | ) | [inline] |
Function make_lower_identifier converts string name to a lower case identifier case. The convertion happens in place.
| name | a char pointer to convert to a lower case identifier. |
Definition at line 229 of file StringUtil.hpp.
| T& sierra::trim | ( | T & | name | ) | [inline] |
Function trim trims preceeding and trailing spaces from name. The convertion happens in place.
| name | a T reference to trim. |
Definition at line 246 of file StringUtil.hpp.
| std::string sierra::title | ( | const std::string & | s | ) |
Function title returns a first letter of each word capitalized of the string.
| s | a std::string const reference to be word capitalized. |
Definition at line 107 of file StringUtil.cpp.
| String sierra::lower | ( | const String & | s | ) | [inline] |
Function lower returns a lower case version of the string.
| s | a String const reference to be lower cased. |
Definition at line 281 of file StringUtil.hpp.
| std::string sierra::to_string | ( | const double & | r, |
| int | precision = 4 |
||
| ) |
Function to_string returns a string representation of r.
| r | a double value to be stringized. |
| precision | an int value of the precision. |
Definition at line 151 of file StringUtil.cpp.
| std::string sierra::to_string | ( | const float & | r, |
| int | precision = 4 |
||
| ) |
Function to_string returns a string representation of r.
| r | a float value to be stringized. |
| precision | an int value of the precision. |
Definition at line 162 of file StringUtil.cpp.
| std::string sierra::to_string | ( | const T & | t | ) |
Template function to_string returns a string representation of r.
| t | a T value to be stringized. |
Definition at line 135 of file StringUtil.cpp.
| const char * sierra::demangle | ( | const char * | symbol | ) |
Function demangle returns the demangled C++ symbol from the mangled C++ symbol. The mangled named is obtained from the type_info name() function. From some compilers, the name is already demangled.
| symbol | a char const pointer to the symbol. |
Definition at line 210 of file Platform.cpp.
| std::string sierra::format_time | ( | double | t, |
| const char * | format = "%b %e %Y %H:%M:%S" |
||
| ) |
Function format_time encodes the time using the format specified. The format is described in stdftime.
| t | a time_t value of the time to format. |
| format | a char const pointer to the format. |
Definition at line 173 of file StringUtil.cpp.
| std::string sierra::word_wrap | ( | const std::string & | s, |
| unsigned int | line_length, | ||
| const std::string & | prefix, | ||
| const std::string & | prefix_first_line | ||
| ) |
Function word_wrap reformats a string into multiple lines, none longer that line_length, the first line prefixed with prefix_first_line and the remaining lines prefixed with prefix.
| s | a std::string const reference to the string to word wrap. |
| line_length | an unsigned int value of the line length. |
| prefix | a std::string const reference to a line prefix string. |
| prefix_first_line | a std::string const reference to a line prefix string for the first line. |
Definition at line 249 of file StringUtil.cpp.
| std::string sierra::word_wrap | ( | const std::string & | s, |
| unsigned int | line_length = 72, |
||
| const std::string & | prefix = "" |
||
| ) | [inline] |
Function word_wrap reformats a string into multiple lines, none longer that line_length and each line prefixed with prefix.
| s | a std::string const reference to the string to word wrap. |
| line_length | an unsigned int value of the line length. |
| prefix | a std::string const reference to a line prefix string. |
Definition at line 386 of file StringUtil.hpp.
| std::ostream& sierra::operator<< | ( | std::ostream & | os, |
| const object_phrase & | phrase | ||
| ) | [inline] |
Function operator<< writes an object phrase to the output stream.
| os | a std::ostream reference to the output stream to write to. |
| phrase | an object_phrase const reference to the object phrase to be written. |
Definition at line 456 of file StringUtil.hpp.
| std::istream & sierra::getline | ( | std::istream & | is, |
| sierra::String & | s, | ||
| char | eol = '\n' |
||
| ) |
Function getline returns a string from the input stream which has been terminated by the newline character.
| is | a std::istream reference to the input stream. |
| s | a sierra::String reference to received the line. |
| eol | a char value to use of the newline character. |
Definition at line 33 of file StringUtil.cpp.
| size_t sierra::hash_string_nocase | ( | const char * | p | ) | [inline] |
Function hash_string_nocase hash a character string case insensitively.
| p | a char const pointer to a character string. |
Definition at line 761 of file StringUtil.hpp.