
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
ASCII string. More...
#include <gelString.h>
Public Member Functions | |
| GelString () | |
| Default constructor. | |
| GelString (GelChar ch) | |
| GelChar constructor. | |
| GelString (const GelString &string) | |
| GelString constructor. | |
| GelString (const char *str) | |
| C string constructor. | |
| ~GelString () | |
| Destructor. | |
| void | append (const GelString &str) |
| Appends a GelString to this string. | |
| void | append (const char *str) |
| Appends an 8-bit C string to this string. | |
| void | append (GelChar ch) |
| Appends a GelChar to this string. | |
| void | append (char ch) |
| Appends an 8-bit character to this string. | |
| void | prepend (const GelString &str) |
| Prepends a GelString to this string. | |
| void | prepend (const char *str) |
| Prepends an 8-bit C string to this string. | |
| void | prepend (GelChar ch) |
| Prepends a GelChar to this string. | |
| void | prepend (char ch) |
| Prepends an 8-bit character to this string. | |
| void | insert (const GelString &str, int pos) |
| Inserts a GelString into this string. | |
| void | insert (GelChar ch, int pos) |
| Inserts a GelChar into this string. | |
| void | clear () |
| Clears the contents of the string. | |
| void | resize (int size) |
| Resizes the string's length. | |
| void | remove (int pos, int num) |
| Removes a section of the string. | |
| void | remove (const GelString &str) |
| Removes every occurence of a string. | |
| void | remove (GelChar ch) |
| Removes every occurence of a character. | |
| void | replace (GelChar before, GelChar after) |
| Replaces every occurence of a character with another character. | |
| void | replace (const GelString &before, const GelString &after) |
| Replaces every occurence of a string with another string. | |
| void | truncate (int pos) |
| Truncates the string at a given position. | |
| int | findFirst (const GelString &str) const |
| Finds the first occurence of a given string. | |
| int | findFirst (GelChar ch) const |
| Finds the first occurence of a given character. | |
| int | findLast (const GelString &str) const |
| Finds the last occurence of a given string. | |
| int | findLast (GelChar ch) const |
| Finds the last occurence of a given character. | |
| int | findNext (const GelString &str, int pos) const |
| Finds the next occurence of a given string. | |
| int | findNext (GelChar ch, int pos) const |
| Finds the next occurence of a given character. | |
| int | count (const GelString &str) const |
| Counts the number of occurences of a given string. | |
| int | count (GelChar ch) const |
| Counts the number of occurences of a given character. | |
| int | compare (const GelString &str) const |
| Compares a string with this string. | |
| void | makeLower () |
| Makes all letters in the string lowercase. | |
| void | makeUpper () |
| Makes all letters in the string uppercase. | |
| GelString | subString (int start, int length) const |
| Returns a section of this string. | |
| GelCString | toAscii () const |
| Converts the GelString to an 8-bit C string. | |
| void | fromAscii (const char *str) |
| Converts an 8-bit C string to a GelString. | |
| int | getLength () const |
| Gets the number of characters in the string. | |
| GelChar * | getData () |
| Gets a pointer to the string data. | |
| const GelChar * | getData () const |
| Gets a pointer to the string data. | |
| GelString & | operator= (GelChar ch) |
| Assigns a GelChar to this string. | |
| GelString & | operator= (const GelString &s) |
| Assigns a GelString to this string. | |
| GelString & | operator= (const char *s) |
| Assigns an 8-bit C string to this string. | |
| GelString & | operator+= (const GelString &s) |
| Appends a GelString to this string. | |
| GelString & | operator+= (const char *s) |
| Appends an 8-bit C string to this string. | |
| GelString & | operator+= (GelChar c) |
| Appends a GelChar to this string. | |
| GelString & | operator+= (char c) |
| Appends an 8-bit character to this string. | |
| GelString | operator+ (GelChar ch) const |
| Concatenates a GelChar and this string. | |
| GelString | operator+ (const GelString &s) const |
| Concatenates two GelStrings. | |
| GelString | operator+ (const char *s) const |
| Concatenates an 8-bit C string and this string. | |
| GelChar & | operator[] (int i) |
| Gets a reference to the character at the specified index. | |
| const GelChar & | operator[] (int i) const |
| Gets a reference to the character at the specified index. | |
Related Functions | |
(Note that these are not member functions.) | |
| GelString | operator+ (GelChar ch, const GelString &s) |
| Concatenates a GelChar and a GelString. | |
| GelString | operator+ (const char *s1, const GelString &s2) |
| Concatenates an 8-bit C string and a GelString. | |
ASCII string.
| gel::GelString::GelString | ( | ) |
Default constructor.
| gel::GelString::GelString | ( | const char * | str | ) |
C string constructor.
| str | : An 8-bit C string. |
| gel::GelString::~GelString | ( | ) | [inline] |
Destructor.
| void gel::GelString::append | ( | const GelString & | str | ) |
Appends a GelString to this string.
| void gel::GelString::append | ( | const char * | str | ) |
Appends an 8-bit C string to this string.
| void gel::GelString::append | ( | char | ch | ) |
Appends an 8-bit character to this string.
| void gel::GelString::prepend | ( | const GelString & | str | ) |
Prepends a GelString to this string.
| void gel::GelString::prepend | ( | const char * | str | ) |
Prepends an 8-bit C string to this string.
| void gel::GelString::prepend | ( | char | ch | ) |
Prepends an 8-bit character to this string.
| void gel::GelString::insert | ( | const GelString & | str, |
| int | pos | ||
| ) |
Inserts a GelString into this string.
| void gel::GelString::clear | ( | ) |
Clears the contents of the string.
| void gel::GelString::resize | ( | int | size | ) |
Resizes the string's length.
| size | : The new length of the string. |
| void gel::GelString::remove | ( | int | pos, |
| int | num | ||
| ) |
Removes a section of the string.
| pos | : The position to start removing characters. |
| num | : The number of characters to remove. |
| void gel::GelString::remove | ( | const GelString & | str | ) |
Removes every occurence of a string.
| str | : The string to remove from this string. |
| void gel::GelString::remove | ( | GelChar | ch | ) |
Removes every occurence of a character.
| ch | : The character to remove from the string. |
Replaces every occurence of a character with another character.
Replaces every occurence of a string with another string.
| void gel::GelString::truncate | ( | int | pos | ) |
Truncates the string at a given position.
| pos | : The position relative to the start of the string to truncate. |
| int gel::GelString::findFirst | ( | const GelString & | str | ) | const |
Finds the first occurence of a given string.
If the string cannot be found in this string, the function will return -1.
| str | : The string to search for. |
| int gel::GelString::findFirst | ( | GelChar | ch | ) | const |
Finds the first occurence of a given character.
If the character cannot be found in this string, the function will return -1.
| ch | : The character to search for. |
| int gel::GelString::findLast | ( | const GelString & | str | ) | const |
Finds the last occurence of a given string.
If the string cannot be found in this string, the function will return -1.
| str | : The string to search for. |
| int gel::GelString::findLast | ( | GelChar | ch | ) | const |
Finds the last occurence of a given character.
If the character cannot be found in this string, the function will return -1.
| ch | : The character to search for. |
| int gel::GelString::findNext | ( | const GelString & | str, |
| int | pos | ||
| ) | const |
Finds the next occurence of a given string.
If the string cannot be found in this string, the function will return -1.
| str | : The string to search for. |
| pos | : The position to start searching. |
| int gel::GelString::findNext | ( | GelChar | ch, |
| int | pos | ||
| ) | const |
Finds the next occurence of a given character.
If the character cannot be found in this string, the function will return -1.
| ch | : The character to search for. |
| pos | : The position to start searching. |
| int gel::GelString::count | ( | const GelString & | str | ) | const |
Counts the number of occurences of a given string.
| str | : The string to search for. |
| int gel::GelString::count | ( | GelChar | ch | ) | const |
Counts the number of occurences of a given character.
| ch | : The character to search for. |
| int gel::GelString::compare | ( | const GelString & | str | ) | const |
Compares a string with this string.
| str | : The string to compare with this string. |
| void gel::GelString::makeLower | ( | ) |
Makes all letters in the string lowercase.
| void gel::GelString::makeUpper | ( | ) |
Makes all letters in the string uppercase.
| GelString gel::GelString::subString | ( | int | start, |
| int | length | ||
| ) | const |
Returns a section of this string.
| start | : The position to start sectioning. |
| length | : The number of characters to copy. |
| GelCString gel::GelString::toAscii | ( | ) | const |
Converts the GelString to an 8-bit C string.
| void gel::GelString::fromAscii | ( | const char * | str | ) |
Converts an 8-bit C string to a GelString.
| int gel::GelString::getLength | ( | ) | const [inline] |
Gets the number of characters in the string.
| GelChar* gel::GelString::getData | ( | ) | [inline] |
Gets a pointer to the string data.
| const GelChar* gel::GelString::getData | ( | ) | const [inline] |
Gets a pointer to the string data.
This is an overloaded function.
| GelString& gel::GelString::operator= | ( | const char * | s | ) |
Assigns an 8-bit C string to this string.
| GelString& gel::GelString::operator+= | ( | const char * | s | ) | [inline] |
Appends an 8-bit C string to this string.
| GelString& gel::GelString::operator+= | ( | char | c | ) | [inline] |
Appends an 8-bit character to this string.
Concatenates a GelChar and this string.
Concatenates two GelStrings.
| GelString gel::GelString::operator+ | ( | const char * | s | ) | const [inline] |
Concatenates an 8-bit C string and this string.
| GelChar& gel::GelString::operator[] | ( | int | i | ) | [inline] |
Gets a reference to the character at the specified index.
| const GelChar& gel::GelString::operator[] | ( | int | i | ) | const [inline] |
Gets a reference to the character at the specified index.
This is an overloaded function.
Concatenates an 8-bit C string and a GelString.
API Documentation by Mark D. Procarione |
Generated by
![]() |