Crazy Eddies GUI System
0.6.0
|
Text utility support class. This class is all static members. You do not create instances of this class. More...
Static Public Member Functions | |
static String | getNextWord (const String &str, String::size_type start_idx=0, const String &delimiters=DefaultWhitespace) |
return a String containing the the next word in a String. More... | |
static String::size_type | getWordStartIdx (const String &str, String::size_type idx) |
Return the index of the first character of the word at idx. More... | |
static String::size_type | getNextWordStartIdx (const String &str, String::size_type idx) |
Return the index of the first character of the word after the word at idx. More... | |
static void | trimLeadingChars (String &str, const String &chars) |
Trim all characters from the set specified in chars from the begining of str. More... | |
static void | trimTrailingChars (String &str, const String &chars) |
Trim all characters from the set specified in chars from the end of str. More... | |
Static Public Attributes | |
static const String | DefaultWhitespace |
The default set of whitespace. | |
static const String | DefaultAlphanumerical |
default set of alphanumericals. | |
static const String | DefaultWrapDelimiters |
The default set of word-wrap delimiters. | |
Text utility support class. This class is all static members. You do not create instances of this class.
|
static |
return a String containing the the next word in a String.
This method returns a String object containing the the word, starting at index \a start_idx, of String \a str as delimited by the code points specified in string \a delimiters (or the ends of the input string).
str | String object containing the input data. |
start_idx | index into str where the search for the next word is to begin. Defaults to start of str. |
delimiters | String object containing the set of delimiter code points to be used when determining the start and end points of a word in string str. Defaults to whitespace. |
References CEGUI::String::find_first_not_of(), CEGUI::String::find_first_of(), CEGUI::String::length(), CEGUI::String::npos, and CEGUI::String::substr().
Referenced by CEGUI::Font::getNextWord().
|
static |
Return the index of the first character of the word after the word at idx.
/note This currently uses DefaultWhitespace and DefaultAlphanumerical to determine groupings for what constitutes a 'word'.
str | String containing text. |
idx | Index into str where search is to begin. |
References DefaultAlphanumerical, DefaultWhitespace, CEGUI::String::find(), CEGUI::String::find_first_not_of(), CEGUI::String::find_first_of(), CEGUI::String::length(), and CEGUI::String::npos.
Referenced by CEGUI::Editbox::handleWordRight(), CEGUI::MultiLineEditbox::handleWordRight(), CEGUI::Editbox::onMouseDoubleClicked(), and CEGUI::MultiLineEditbox::onMouseDoubleClicked().
|
static |
Return the index of the first character of the word at idx.
/note This currently uses DefaultWhitespace and DefaultAlphanumerical to determine groupings for what constitutes a 'word'.
str | String containing text. |
idx | Index into str where search for start of word is to begin. |
References DefaultAlphanumerical, DefaultWhitespace, CEGUI::String::find(), CEGUI::String::find_last_not_of(), CEGUI::String::find_last_of(), CEGUI::String::length(), CEGUI::String::npos, CEGUI::String::substr(), and trimTrailingChars().
Referenced by CEGUI::Editbox::handleWordLeft(), CEGUI::MultiLineEditbox::handleWordLeft(), CEGUI::Editbox::onMouseDoubleClicked(), and CEGUI::MultiLineEditbox::onMouseDoubleClicked().
Trim all characters from the set specified in chars from the begining of str.
str | String object to be trimmed. |
chars | String object containing the set of code points to be trimmed. |
References CEGUI::String::erase(), CEGUI::String::find_first_not_of(), and CEGUI::String::npos.
Trim all characters from the set specified in chars from the end of str.
str | String object to be trimmed. |
chars | String object containing the set of code points to be trimmed. |
References CEGUI::String::erase(), CEGUI::String::find_last_not_of(), CEGUI::String::npos, and CEGUI::String::resize().
Referenced by getWordStartIdx(), and CEGUI::MultiColumnListProperties::ColumnHeader::set().