|
tgen
|
String value. More...

Public Member Functions | |
| value (const std::string &str) | |
| Creates a string value from a std::string. | |
| int | size () const |
| Returns the size of the string value. | |
| char & | operator[] (int idx) |
| Accesses the character at some position of the value. | |
| value & | sort () |
| Sorts the characters in non-decreasing order. | |
| value & | reverse () |
| Reverses the value. | |
| value & | lowercase () |
| Sets all characters to lowercase. | |
| value & | uppercase () |
| Sets all characters to uppercase. | |
| value | operator+ (const value &rhs) |
| Concatenates two values. | |
| std::string | to_std () const |
| Converts the value to a std::string. | |
| Public Member Functions inherited from tgen::gen_value_base< value > | |
| bool | operator< (const value &rhs) const |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const value &inst) |
| Prints the value to a std::ostream. | |
String value.
It can be deterministically operated upon and printed through std::cout.
|
inline |
Creates a string value from a std::string.
| str | The std::string representing the value. |
|
inline |
Sets all characters to lowercase.
O(n).
Concatenates two values.
| rhs | The right-hand side. |
Linear.
|
inline |
Accesses the character at some position of the value.
| idx | Index to be accessed. |
|
inline |
Reverses the value.
O(n).
|
inline |
Returns the size of the string value.
|
inline |
Sorts the characters in non-decreasing order.
O(n log n).
|
inline |
Converts the value to a std::string.
|
inline |
Sets all characters to uppercase.
O(n).
|
friend |