|
tgen
|
String instance. More...

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