Non-stl string with some simple features. More...
Public Member Functions | |
void | Append (const String &str) |
Appends another string to the end of this. | |
void | Append (char c) |
Appends a character to the end of this string. | |
void | Append (const char *add_str) |
Appends another string to the end of this. | |
void | Append (const char *add_str, index_t add_length) |
Appends another string to the end of this (power user). | |
void | Append (const String &str) |
Appends another string to the end of this. | |
void | Append (char c) |
Appends a character to the end of this string. | |
void | Append (const char *add_str) |
Appends another string to the end of this. | |
void | Append (const char *add_str, index_t add_length) |
Appends another string to the end of this (power user). | |
const char * | begin () const |
Returns a pointer to the first character. | |
char * | begin () |
Returns a pointer to the first character. | |
const char * | begin () const |
Returns a pointer to the first character. | |
char * | begin () |
Returns a pointer to the first character. | |
char * | c_str () |
Returns the internally represented c-string. | |
const char * | c_str () const |
Returns the internally represented c-string. | |
char * | c_str () |
Returns the internally represented c-string. | |
const char * | c_str () const |
Returns the internally represented c-string. | |
int | CompareNoCase (const char *s) const |
Compares two strings case-insensitively. | |
int | CompareNoCase (const char *s) const |
Compares two strings case-insensitively. | |
int | CompareTo (const char *s) const |
Compares two strings. | |
int | CompareTo (const String &other) const |
Compares two strings. | |
int | CompareTo (const char *s) const |
Compares two strings. | |
int | CompareTo (const String &other) const |
Compares two strings. | |
void | Copy (const char *str) |
Initializes as a copy of a c-style string. | |
void | Copy (const char *str_region_begin, index_t len) |
Initializes as a copy of an existing region of characters. | |
void | Copy (const char *str) |
Initializes as a copy of a c-style string. | |
void | Copy (const char *str_region_begin, index_t len) |
Initializes as a copy of an existing region of characters. | |
void | Destruct () |
Free up the string so you can reinitialize this to another string. | |
void | Destruct () |
Free up the string so you can reinitialize this to another string. | |
char * | end () |
Returns a pointer to the null terminator character. | |
const char * | end () const |
Returns a pointer to the null terminator character. | |
char * | end () |
Returns a pointer to the null terminator character. | |
const char * | end () const |
Returns a pointer to the null terminator character. | |
bool | EqualsNoCase (const char *s) const |
Checks if two strings are equal. | |
bool | EqualsNoCase (const char *s) const |
Checks if two strings are equal. | |
EXPAND_EQUALS (String) | |
EXPAND_EQUALS (String) | |
EXPAND_HETERO_EQUALS (String, char) | |
EXPAND_HETERO_EQUALS (String, const char *) | |
EXPAND_HETERO_EQUALS (String, char) | |
EXPAND_HETERO_EQUALS (String, const char *) | |
EXPAND_HETERO_LESS_THAN (String, char) | |
EXPAND_HETERO_LESS_THAN (char, String) | |
EXPAND_HETERO_LESS_THAN (String, const char *) | |
EXPAND_HETERO_LESS_THAN (const char *, String) | |
EXPAND_HETERO_LESS_THAN (String, char) | |
EXPAND_HETERO_LESS_THAN (char, String) | |
EXPAND_HETERO_LESS_THAN (String, const char *) | |
EXPAND_HETERO_LESS_THAN (const char *, String) | |
EXPAND_LESS_THAN (String) | |
EXPAND_LESS_THAN (String) | |
index_t | Find (const char *s) const |
index_t | Find (char c) const |
index_t | Find (const char *s) const |
index_t | Find (char c) const |
index_t | FindAny (const char *char_set, index_t skip_initial=0) const |
index_t | FindAny (const char *char_set, index_t skip_initial=0) const |
index_t | FindR (char c) const |
index_t | FindR (char c) const |
void | FixLength () |
Sets the length to the strlen of the string (power user, when boulding strings). | |
void | FixLength () |
Sets the length to the strlen of the string (power user, when boulding strings). | |
index_t | IndexFromPtr (const char *position) const |
index_t | IndexFromPtr (const char *position) const |
void | Init (int finalLength) |
Allocate a buffer length -- this string won't really be a valid string until you fill the entire buffer. | |
void | Init () |
Initialize to empty string. | |
void | Init (int finalLength) |
Allocate a buffer length -- this string won't really be a valid string until you fill the entire buffer. | |
void | Init () |
Initialize to empty string. | |
const String & | InitSprintf (const char *format,...) |
Initialize the string in sprintf style. | |
const String & | InitSprintf (const char *format,...) |
Initialize the string in sprintf style. | |
bool | is_empty () const |
Returns true if this string is zero length. | |
bool | is_empty () const |
Returns true if this string is zero length. | |
index_t | length () const |
Returns the length of the string. | |
index_t | length () const |
Returns the length of the string. | |
operator const char * () const | |
Implicit conversion to c-string. | |
operator const char * () const | |
Implicit conversion to c-string. | |
const String & | operator+= (const char *s) |
Appends another string to the end of this. | |
const String & | operator+= (char c) |
Appends a character to the end of this string. | |
const String & | operator+= (const String &o) |
Appends another string to the end of this. | |
const String & | operator+= (const char *s) |
Appends another string to the end of this. | |
const String & | operator+= (char c) |
Appends a character to the end of this string. | |
const String & | operator+= (const String &o) |
Appends another string to the end of this. | |
char & | operator[] (index_t index) |
Gets individual characters, and allows modification. | |
char | operator[] (index_t index) const |
Gets individual characters. | |
char & | operator[] (index_t index) |
Gets individual characters, and allows modification. | |
char | operator[] (index_t index) const |
Gets individual characters. | |
void | SetLength (index_t newlen) |
Sets the length of the string, if you expect to write past the end of this string (power user). | |
void | SetLength (index_t newlen) |
Sets the length of the string, if you expect to write past the end of this string (power user). | |
index_t | Split (const char *delimeters, ArrayList< String > *result) const |
Splits up the string like strtok. | |
index_t | Split (index_t start_index, const char *delimeters, const char *donechars, index_t max_portions, ArrayList< String > *result) const |
Splits up the string like strtok. | |
index_t | Split (const char *delimeters, ArrayList< String > *result) const |
Splits up the string like strtok. | |
index_t | Split (index_t start_index, const char *delimeters, const char *donechars, index_t max_portions, ArrayList< String > *result) const |
Splits up the string like strtok. | |
bool | StartsWith (const char *s) const |
Checks if this string begins with another string. | |
bool | StartsWith (const char *s) const |
Checks if this string begins with another string. | |
void | Steal (char *str) |
void | Steal (char *str, index_t len) |
void | Steal (char *str, index_t len, index_t capacity) |
void | Steal (ArrayList< char > *null_terminated_char_list) |
void | Steal (char *str) |
void | Steal (char *str, index_t len) |
void | Steal (char *str, index_t len, index_t capacity) |
void | Steal (ArrayList< char > *null_terminated_char_list) |
void | StealDestruct (String *other) |
Steals the string the other is pointing to, and "uninitializes" the string. | |
void | StealDestruct (String *other) |
Steals the string the other is pointing to, and "uninitializes" the string. | |
String (const char *s) | |
Implicit conversion constructor. | |
String (const char *s) | |
Implicit conversion constructor. | |
void | Swap (String *other) |
Swaps with another string. | |
void | Swap (String *other) |
Swaps with another string. | |
void | Terminate () |
Puts a null terminator at the end of the string. | |
void | Terminate () |
Puts a null terminator at the end of the string. | |
void | Trim (const char *delimeters, String *result) const |
Creates a new string with the specified characters removed from the left and right parts of the string. | |
void | Trim () |
Minimizes the memory used after a lot of dynamic resizing. | |
void | Trim (const char *delimeters, String *result) const |
Creates a new string with the specified characters removed from the left and right parts of the string. | |
void | Trim () |
Minimizes the memory used after a lot of dynamic resizing. | |
void | TrimLeft (const char *delimeters, String *result) const |
Creates a new string with the specified characters removed from the left part of the string. | |
void | TrimLeft (const char *delimeters, String *result) const |
Creates a new string with the specified characters removed from the left part of the string. | |
void | TrimRight (const char *delimeters, String *result) const |
Creates a new string with the specified characters removed from the right part of the string. | |
void | TrimRight (const char *delimeters, String *result) const |
Creates a new string with the specified characters removed from the right part of the string. | |
void | Truncate (index_t newlen) |
Truncates this string at a given length. | |
void | Truncate (const char *s) |
Reduces the length of the string to a particular location within this string (power user). | |
void | Truncate (index_t newlen) |
Truncates this string at a given length. | |
void | Truncate (const char *s) |
Reduces the length of the string to a particular location within this string (power user). | |
Friends | |
bool | operator< (const String &a, char b) |
bool | operator< (char a, const String &b) |
bool | operator< (const String &a, const char *b) |
bool | operator< (const char *a, const String &b) |
bool | operator< (const String &a, const String &b) |
bool | operator< (const String &a, char b) |
bool | operator< (char a, const String &b) |
bool | operator< (const String &a, const char *b) |
bool | operator< (const char *a, const String &b) |
bool | operator< (const String &a, const String &b) |
bool | operator== (const String &a, char b) |
bool | operator== (const String &a, const char *b) |
bool | operator== (const String &a, const String &b) |
bool | operator== (const String &a, char b) |
bool | operator== (const String &a, const char *b) |
bool | operator== (const String &a, const String &b) |
Non-stl string with some simple features.
The motivation for this is its ability to work well with ArrayList and supports our coding conventions. Beyond that, it has a few convenient tokenizers that you may find useful. Finally, it is non-templated, so compiler errors are easier to understand.
WARNING: This has not gone through rigorous testing -- we expect it to work, but there may be some issues. You will be just fine using the STL string if you need string processing.
Definition at line 59 of file col_string.h.
String::String | ( | const char * | s | ) | [inline] |
String::String | ( | const char * | s | ) | [inline] |
void String::Append | ( | const String & | str | ) | [inline] |
Appends another string to the end of this.
Amortized O(o.length()).
Definition at line 302 of file col_string.h.
References Append(), ArrayList< TElem >::begin(), and length().
void String::Append | ( | char | c | ) | [inline] |
Appends a character to the end of this string.
Amortized O(1).
Definition at line 293 of file col_string.h.
References ArrayList< TElem >::back(), and ArrayList< TElem >::PushBackCopy().
void String::Append | ( | const char * | add_str | ) | [inline] |
Appends another string to the end of this.
Amortized O(strlen(s)).
Definition at line 285 of file col_string.h.
References Append().
void String::Append | ( | const char * | add_str, | |
index_t | add_length | |||
) | [inline] |
Appends another string to the end of this (power user).
Amortized O(strlen(s)). You pass in the length of the string for speed reasons.
add_str | null-terminated string | |
add_length | the length of the string |
Definition at line 275 of file col_string.h.
References ArrayList< TElem >::begin(), ArrayList< TElem >::Resize(), and ArrayList< TElem >::size().
void String::Append | ( | const String & | str | ) | [inline] |
Appends another string to the end of this.
Amortized O(o.length()).
Definition at line 302 of file col_string.h.
References Append(), ArrayList< TElem >::begin(), and length().
void String::Append | ( | char | c | ) | [inline] |
Appends a character to the end of this string.
Amortized O(1).
Definition at line 293 of file col_string.h.
References ArrayList< TElem >::back(), and ArrayList< TElem >::PushBackCopy().
void String::Append | ( | const char * | add_str | ) | [inline] |
Appends another string to the end of this.
Amortized O(strlen(s)).
Definition at line 285 of file col_string.h.
References Append().
void String::Append | ( | const char * | add_str, | |
index_t | add_length | |||
) | [inline] |
Appends another string to the end of this (power user).
Amortized O(strlen(s)). You pass in the length of the string for speed reasons.
add_str | null-terminated string | |
add_length | the length of the string |
Definition at line 275 of file col_string.h.
References ArrayList< TElem >::begin(), ArrayList< TElem >::Resize(), and ArrayList< TElem >::size().
Referenced by Append(), and operator+=().
const char* String::begin | ( | ) | const [inline] |
Returns a pointer to the first character.
Definition at line 178 of file col_string.h.
References ArrayList< TElem >::begin().
char* String::begin | ( | ) | [inline] |
Returns a pointer to the first character.
Definition at line 175 of file col_string.h.
References ArrayList< TElem >::begin().
const char* String::begin | ( | ) | const [inline] |
Returns a pointer to the first character.
Definition at line 178 of file col_string.h.
References ArrayList< TElem >::begin().
char* String::begin | ( | ) | [inline] |
Returns a pointer to the first character.
Definition at line 175 of file col_string.h.
References ArrayList< TElem >::begin().
Referenced by CompareTo(), DatasetInfo::InitFromFile(), DatasetInfo::ReadPoint(), Split(), Trim(), TrimLeft(), TrimRight(), and Truncate().
char* String::c_str | ( | ) | [inline] |
Returns the internally represented c-string.
Definition at line 171 of file col_string.h.
References ArrayList< TElem >::begin().
const char* String::c_str | ( | ) | const [inline] |
Returns the internally represented c-string.
Definition at line 168 of file col_string.h.
References ArrayList< TElem >::begin().
char* String::c_str | ( | ) | [inline] |
Returns the internally represented c-string.
Definition at line 171 of file col_string.h.
References ArrayList< TElem >::begin().
const char* String::c_str | ( | ) | const [inline] |
Returns the internally represented c-string.
Definition at line 168 of file col_string.h.
References ArrayList< TElem >::begin().
Referenced by TextLineReader::Error(), DatasetInfo::ReadPoint(), and DatasetInfo::WriteArffHeader().
int String::CompareNoCase | ( | const char * | s | ) | const [inline] |
Compares two strings case-insensitively.
Definition at line 418 of file col_string.h.
References ArrayList< TElem >::begin().
int String::CompareNoCase | ( | const char * | s | ) | const [inline] |
Compares two strings case-insensitively.
Definition at line 418 of file col_string.h.
References ArrayList< TElem >::begin().
Referenced by EqualsNoCase().
int String::CompareTo | ( | const char * | s | ) | const [inline] |
Compares two strings.
If I am the lesser string, I return negative.
Definition at line 447 of file col_string.h.
References begin().
int String::CompareTo | ( | const String & | other | ) | const [inline] |
Compares two strings.
If I am the lesser string, I return negative.
Definition at line 440 of file col_string.h.
References begin().
int String::CompareTo | ( | const char * | s | ) | const [inline] |
Compares two strings.
If I am the lesser string, I return negative.
Definition at line 447 of file col_string.h.
References begin().
int String::CompareTo | ( | const String & | other | ) | const [inline] |
Compares two strings.
If I am the lesser string, I return negative.
Definition at line 440 of file col_string.h.
References begin().
void String::Copy | ( | const char * | str | ) | [inline] |
Initializes as a copy of a c-style string.
Definition at line 117 of file col_string.h.
References ArrayList< TElem >::InitCopy().
void String::Copy | ( | const char * | str_region_begin, | |
index_t | len | |||
) | [inline] |
Initializes as a copy of an existing region of characters.
The existing array does not need to be null terminated.
Definition at line 108 of file col_string.h.
References ArrayList< TElem >::begin(), Copy(), ArrayList< TElem >::Init(), and Terminate().
void String::Copy | ( | const char * | str | ) | [inline] |
Initializes as a copy of a c-style string.
Definition at line 117 of file col_string.h.
References ArrayList< TElem >::InitCopy().
void String::Copy | ( | const char * | str_region_begin, | |
index_t | len | |||
) | [inline] |
Initializes as a copy of an existing region of characters.
The existing array does not need to be null terminated.
Definition at line 108 of file col_string.h.
References ArrayList< TElem >::begin(), ArrayList< TElem >::Init(), and Terminate().
Referenced by Copy(), DatasetFeature::Format(), DatasetInfo::Init(), DatasetInfo::InitContinuous(), DatasetInfo::ReadPoint(), DatasetInfo::set_name(), String(), Trim(), TrimLeft(), and TrimRight().
void String::Destruct | ( | ) | [inline] |
Free up the string so you can reinitialize this to another string.
Definition at line 124 of file col_string.h.
void String::Destruct | ( | ) | [inline] |
Free up the string so you can reinitialize this to another string.
Definition at line 124 of file col_string.h.
Referenced by TextLineReader::Gobble(), DatasetInfo::set_name(), and StealDestruct().
char* String::end | ( | ) | [inline] |
Returns a pointer to the null terminator character.
Definition at line 185 of file col_string.h.
References ArrayList< TElem >::end().
const char* String::end | ( | ) | const [inline] |
Returns a pointer to the null terminator character.
Definition at line 181 of file col_string.h.
References ArrayList< TElem >::end().
char* String::end | ( | ) | [inline] |
Returns a pointer to the null terminator character.
Definition at line 185 of file col_string.h.
References ArrayList< TElem >::end().
const char* String::end | ( | ) | const [inline] |
Returns a pointer to the null terminator character.
Definition at line 181 of file col_string.h.
References ArrayList< TElem >::end().
Referenced by DatasetInfo::ReadPoint(), Trim(), TrimLeft(), and TrimRight().
bool String::EqualsNoCase | ( | const char * | s | ) | const [inline] |
Checks if two strings are equal.
Definition at line 424 of file col_string.h.
References CompareNoCase().
bool String::EqualsNoCase | ( | const char * | s | ) | const [inline] |
Checks if two strings are equal.
Definition at line 424 of file col_string.h.
References CompareNoCase().
Referenced by DatasetInfo::InitFromArff().
void String::FixLength | ( | ) | [inline] |
Sets the length to the strlen of the string (power user, when boulding strings).
Definition at line 227 of file col_string.h.
References ArrayList< TElem >::begin(), and ArrayList< TElem >::Resize().
void String::FixLength | ( | ) | [inline] |
Sets the length to the strlen of the string (power user, when boulding strings).
Definition at line 227 of file col_string.h.
References ArrayList< TElem >::begin(), and ArrayList< TElem >::Resize().
void String::Init | ( | int | finalLength | ) | [inline] |
Allocate a buffer length -- this string won't really be a valid string until you fill the entire buffer.
Definition at line 92 of file col_string.h.
References ArrayList< TElem >::Init().
void String::Init | ( | ) | [inline] |
Initialize to empty string.
Definition at line 83 of file col_string.h.
References ArrayList< TElem >::Init().
void String::Init | ( | int | finalLength | ) | [inline] |
Allocate a buffer length -- this string won't really be a valid string until you fill the entire buffer.
Definition at line 92 of file col_string.h.
References ArrayList< TElem >::Init().
void String::Init | ( | ) | [inline] |
Initialize to empty string.
Definition at line 83 of file col_string.h.
References ArrayList< TElem >::Init().
Referenced by TextLineReader::Gobble(), and TextLineReader::Open().
const String& String::InitSprintf | ( | const char * | format, | |
... | ||||
) |
Initialize the string in sprintf style.
format | the printf-style format string and arguments |
const String & String::InitSprintf | ( | const char * | format, | |
... | ||||
) |
Initialize the string in sprintf style.
format | the printf-style format string and arguments |
Definition at line 45 of file col.cc.
References mem::Realloc().
Referenced by DatasetFeature::Format(), DatasetInfo::InitContinuous(), and DatasetInfo::InitFromCsv().
bool String::is_empty | ( | ) | const [inline] |
Returns true if this string is zero length.
Definition at line 263 of file col_string.h.
References ArrayList< TElem >::size().
bool String::is_empty | ( | ) | const [inline] |
Returns true if this string is zero length.
Definition at line 263 of file col_string.h.
References ArrayList< TElem >::size().
index_t String::length | ( | ) | const [inline] |
Returns the length of the string.
Definition at line 190 of file col_string.h.
References ArrayList< TElem >::size().
index_t String::length | ( | ) | const [inline] |
Returns the length of the string.
Definition at line 190 of file col_string.h.
References ArrayList< TElem >::size().
String::operator const char * | ( | ) | const [inline] |
Implicit conversion to c-string.
Definition at line 164 of file col_string.h.
References ArrayList< TElem >::begin().
String::operator const char * | ( | ) | const [inline] |
Implicit conversion to c-string.
Definition at line 164 of file col_string.h.
References ArrayList< TElem >::begin().
const String& String::operator+= | ( | const char * | s | ) | [inline] |
Appends another string to the end of this.
Amortized O(strlen(s)).
Definition at line 329 of file col_string.h.
References Append().
const String& String::operator+= | ( | char | c | ) | [inline] |
Appends a character to the end of this string.
Amortized O(1).
Definition at line 320 of file col_string.h.
References Append().
Appends another string to the end of this.
Amortized O(o.length()).
Definition at line 311 of file col_string.h.
References Append().
const String& String::operator+= | ( | const char * | s | ) | [inline] |
Appends another string to the end of this.
Amortized O(strlen(s)).
Definition at line 329 of file col_string.h.
References Append().
const String& String::operator+= | ( | char | c | ) | [inline] |
Appends a character to the end of this string.
Amortized O(1).
Definition at line 320 of file col_string.h.
References Append().
Appends another string to the end of this.
Amortized O(o.length()).
Definition at line 311 of file col_string.h.
References Append().
char& String::operator[] | ( | index_t | index | ) | [inline] |
Gets individual characters, and allows modification.
Definition at line 342 of file col_string.h.
char String::operator[] | ( | index_t | index | ) | const [inline] |
Gets individual characters.
Definition at line 337 of file col_string.h.
char& String::operator[] | ( | index_t | index | ) | [inline] |
Gets individual characters, and allows modification.
Definition at line 342 of file col_string.h.
char String::operator[] | ( | index_t | index | ) | const [inline] |
Gets individual characters.
Definition at line 337 of file col_string.h.
void String::SetLength | ( | index_t | newlen | ) | [inline] |
Sets the length of the string, if you expect to write past the end of this string (power user).
Definition at line 218 of file col_string.h.
References ArrayList< TElem >::Resize(), and Terminate().
void String::SetLength | ( | index_t | newlen | ) | [inline] |
Sets the length of the string, if you expect to write past the end of this string (power user).
Definition at line 218 of file col_string.h.
References ArrayList< TElem >::Resize(), and Terminate().
Splits up the string like strtok.
Example:
String s; ArrayList<String> list; s.Copy(",,a, b;c, d,,") list.Init(); s.Split(",; ", &list); // The result is: "a", "b", "c", "d".
*
delimeters | the delimeter characters you are interested in | |
result | the ArrayList to append results to (must be initialized) |
Definition at line 393 of file col_string.h.
References Split().
index_t String::Split | ( | index_t | start_index, | |
const char * | delimeters, | |||
const char * | donechars, | |||
index_t | max_portions, | |||
ArrayList< String > * | result | |||
) | const |
Splits up the string like strtok.
Starts at begin_index, skips initial delimeters. Proceeds to find any character in the delimeters or donechars. If it's a delimeter and no more max_portions has not been exceeded, a token is made. Processing stops when donechars are found.
Example:
String s; ArrayList<String> list; s.Copy("XXX,,,a, b;c; d! qrstuvk") list.Init(); s.Split(3, ",; ", "!", 3, &list); // The result is: "a", "b", "c; d". (notice last two are one string)
start_index | the index to start at (initial characters to skip) | |
delimeters | the delimeter characters you are interested in | |
donechars | characters on which to stop (you can use "") | |
max_portions | the maximum number of portions (0 means unlimited) | |
result | the ArrayList to append results to (must be initialized) |
Splits up the string like strtok.
Example:
String s; ArrayList<String> list; s.Copy(",,a, b;c, d,,") list.Init(); s.Split(",; ", &list); // The result is: "a", "b", "c", "d".
*
delimeters | the delimeter characters you are interested in | |
result | the ArrayList to append results to (must be initialized) |
Definition at line 393 of file col_string.h.
References Split().
index_t String::Split | ( | index_t | start_index, | |
const char * | delimeters, | |||
const char * | donechars, | |||
index_t | max_portions, | |||
ArrayList< String > * | result | |||
) | const |
Splits up the string like strtok.
Starts at begin_index, skips initial delimeters. Proceeds to find any character in the delimeters or donechars. If it's a delimeter and no more max_portions has not been exceeded, a token is made. Processing stops when donechars are found.
Example:
String s; ArrayList<String> list; s.Copy("XXX,,,a, b;c; d! qrstuvk") list.Init(); s.Split(3, ",; ", "!", 3, &list); // The result is: "a", "b", "c; d". (notice last two are one string)
start_index | the index to start at (initial characters to skip) | |
delimeters | the delimeter characters you are interested in | |
donechars | characters on which to stop (you can use "") | |
max_portions | the maximum number of portions (0 means unlimited) | |
result | the ArrayList to append results to (must be initialized) |
Definition at line 92 of file col.cc.
References ArrayList< TElem >::back(), begin(), length(), and ArrayList< TElem >::PushBack().
Referenced by DatasetInfo::InitFromArff(), DatasetInfo::InitFromCsv(), data::LargeLoad(), and Split().
bool String::StartsWith | ( | const char * | s | ) | const [inline] |
Checks if this string begins with another string.
Definition at line 431 of file col_string.h.
References ArrayList< TElem >::begin().
bool String::StartsWith | ( | const char * | s | ) | const [inline] |
Checks if this string begins with another string.
Definition at line 431 of file col_string.h.
References ArrayList< TElem >::begin().
void String::StealDestruct | ( | String * | other | ) | [inline] |
Steals the string the other is pointing to, and "uninitializes" the string.
Definition at line 139 of file col_string.h.
References Destruct(), and ArrayList< TElem >::InitSteal().
void String::StealDestruct | ( | String * | other | ) | [inline] |
Steals the string the other is pointing to, and "uninitializes" the string.
Definition at line 139 of file col_string.h.
References Destruct(), and ArrayList< TElem >::InitSteal().
void String::Swap | ( | String * | other | ) | [inline] |
Swaps with another string.
Definition at line 131 of file col_string.h.
References ArrayList< TElem >::Swap().
void String::Swap | ( | String * | other | ) | [inline] |
Swaps with another string.
Definition at line 131 of file col_string.h.
References ArrayList< TElem >::Swap().
void String::Terminate | ( | ) | [inline] |
Puts a null terminator at the end of the string.
Definition at line 233 of file col_string.h.
References ArrayList< TElem >::back().
void String::Terminate | ( | ) | [inline] |
Puts a null terminator at the end of the string.
Definition at line 233 of file col_string.h.
References ArrayList< TElem >::back().
Referenced by Copy(), SetLength(), and Truncate().
void String::Trim | ( | const char * | delimeters, | |
String * | result | |||
) | const |
Creates a new string with the specified characters removed from the left and right parts of the string.
void String::Trim | ( | ) | [inline] |
Minimizes the memory used after a lot of dynamic resizing.
Definition at line 240 of file col_string.h.
References ArrayList< TElem >::Trim().
void String::Trim | ( | const char * | delimeters, | |
String * | result | |||
) | const |
void String::Trim | ( | ) | [inline] |
Minimizes the memory used after a lot of dynamic resizing.
Definition at line 240 of file col_string.h.
References ArrayList< TElem >::Trim().
void String::TrimLeft | ( | const char * | delimeters, | |
String * | result | |||
) | const |
Creates a new string with the specified characters removed from the left part of the string.
void String::TrimLeft | ( | const char * | delimeters, | |
String * | result | |||
) | const |
void String::TrimRight | ( | const char * | delimeters, | |
String * | result | |||
) | const |
Creates a new string with the specified characters removed from the right part of the string.
void String::TrimRight | ( | const char * | delimeters, | |
String * | result | |||
) | const |
void String::Truncate | ( | index_t | newlen | ) | [inline] |
Truncates this string at a given length.
newlen | the new length to truncate to |
Definition at line 209 of file col_string.h.
References ArrayList< TElem >::Resize(), and Terminate().
void String::Truncate | ( | const char * | s | ) | [inline] |
Reduces the length of the string to a particular location within this string (power user).
s | a pointer to a character in this string |
Definition at line 199 of file col_string.h.
References begin(), ArrayList< TElem >::Resize(), and Terminate().
void String::Truncate | ( | index_t | newlen | ) | [inline] |
Truncates this string at a given length.
newlen | the new length to truncate to |
Definition at line 209 of file col_string.h.
References ArrayList< TElem >::Resize(), and Terminate().
void String::Truncate | ( | const char * | s | ) | [inline] |
Reduces the length of the string to a particular location within this string (power user).
s | a pointer to a character in this string |
Definition at line 199 of file col_string.h.
References begin(), ArrayList< TElem >::Resize(), and Terminate().