Wrapper around the std::string class with augmented functionality.
More...
#include <String.h>
Wrapper around the std::string class with augmented functionality.
Definition at line 16 of file String.h.
◆ String() [1/4]
| utils::String::String |
( |
| ) |
|
◆ String() [2/4]
| utils::String::String |
( |
const char * | text | ) |
|
Construct string.
- Parameters
-
| text | The string in char format |
Definition at line 15 of file String.cpp.
◆ String() [3/4]
| utils::String::String |
( |
const String & | text | ) |
|
Construct string.
- Parameters
-
| text | The string in string format |
Definition at line 17 of file String.cpp.
◆ String() [4/4]
| utils::String::String |
( |
const std::basic_string< char > & | text | ) |
|
Construct string.
- Parameters
-
| text | The string in vector char format |
Definition at line 19 of file String.cpp.
◆ ~String()
| utils::String::~String |
( |
| ) |
|
|
virtual |
Destroy class properly.
Definition at line 74 of file String.cpp.
◆ operator()() [1/2]
Get a specific character in the string.
- Parameters
-
| idx | The index of the character |
- Returns
- The character
Definition at line 49 of file String.cpp.
◆ operator()() [2/2]
| utils::String utils::String::operator() |
( |
size_t | startIdx, |
|
|
size_t | lastIdx ) const |
Extract a portion of the string.
- Parameters
-
| startIdx | The index of the first character |
| lastIdx | The index of the last character |
- Returns
- The portion of the string
Definition at line 57 of file String.cpp.
◆ operator+() [1/4]
Append a char to the string.
- Parameters
-
- Returns
- The appended string
Definition at line 31 of file String.cpp.
◆ operator+() [2/4]
Append a double to the string.
- Parameters
-
- Returns
- The appended string
Definition at line 37 of file String.cpp.
◆ operator+() [3/4]
Append an int to the string.
- Parameters
-
- Returns
- The appended string
Definition at line 45 of file String.cpp.
◆ operator+() [4/4]
Append an unsigned int to the string.
- Parameters
-
| val | The unsinged int to add |
- Returns
- The appended string
Definition at line 41 of file String.cpp.
◆ operator=()
Allow to use operator=.
- Parameters
-
- Returns
- The string
Definition at line 22 of file String.cpp.
◆ removeTrailing()
The trailing tags of a string.
- Parameters
-
| origin | The string to remove the trailing tags from |
| trailTag | The tag to remove |
- Returns
- The string without the trailing tag
Example : The string "2.82823000" will return "2.82823" for the tag "0"
Definition at line 106 of file String.cpp.
◆ to_string() [1/2]
Overload of the to_string C++11 function to allow for X-digits precision.
- Parameters
-
- Returns
- The double converter to string
Definition at line 92 of file String.cpp.
◆ to_string() [2/2]
Overload of the to_string C++11 function to allow for X-digits precision.
- Parameters
-
- Returns
- The float converter to string
Definition at line 99 of file String.cpp.
◆ tolower() [1/2]
Return a lower case string.
- Returns
- The lower case string
Definition at line 82 of file String.cpp.
◆ tolower() [2/2]
Convert a string to a lower case string.
- Parameters
-
- Returns
- The new string
Definition at line 76 of file String.cpp.
◆ toupper() [1/2]
Return an upper case string.
- Returns
- The upper case string
Definition at line 90 of file String.cpp.
◆ toupper() [2/2]
Convert a string to a upper case string.
- Parameters
-
- Returns
- The new string
Definition at line 84 of file String.cpp.
The documentation for this class was generated from the following files: