#include <CEGUITextUtils.h>
Collaboration diagram for CEGUI::TextUtils:
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. | |
static String::size_type | getWordStartIdx (const String &str, String::size_type idx) |
Return the index of the first character of the word at idx. | |
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. | |
static void | trimLeadingChars (String &str, const String &chars) |
Trim all characters from the set specified in chars from the begining of str. | |
static void | trimTrailingChars (String &str, const String &chars) |
Trim all characters from the set specified in chars from the end of str. | |
Static Public Attributes | |
static const String | DefaultWhitespace = (utf8*)" \n\t\r" |
The default set of whitespace. | |
static const String | DefaultAlphanumerical = (utf8*)"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" |
default set of alphanumericals. | |
static const String | DefaultWrapDelimiters = (utf8*)" \n\t\r" |
The default set of word-wrap delimiters. |
Definition at line 40 of file CEGUITextUtils.h.
|
return a String containing the the next word in a String. This method returns a String object containing the the word, starting at index start_idx, of String str as delimited by the code points specified in string delimiters (or the ends of the input string).
Definition at line 42 of file CEGUITextUtils.cpp. References CEGUI::String::find_first_not_of(), CEGUI::String::find_first_of(), CEGUI::String::length(), CEGUI::String::npos, and CEGUI::String::substr(). |
|
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'.
Definition at line 103 of file CEGUITextUtils.cpp. 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::MultiLineEditbox::handleWordRight(), CEGUI::Editbox::handleWordRight(), CEGUI::MultiLineEditbox::onMouseDoubleClicked(), and CEGUI::Editbox::onMouseDoubleClicked(). |
|
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'.
Definition at line 65 of file CEGUITextUtils.cpp. 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::MultiLineEditbox::handleWordLeft(), CEGUI::Editbox::handleWordLeft(), CEGUI::MultiLineEditbox::onMouseDoubleClicked(), and CEGUI::Editbox::onMouseDoubleClicked(). |
|
Trim all characters from the set specified in chars from the begining of str.
Definition at line 155 of file CEGUITextUtils.cpp. 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.
Definition at line 175 of file CEGUITextUtils.cpp. References CEGUI::String::erase(), CEGUI::String::find_last_not_of(), CEGUI::String::npos, and CEGUI::String::resize(). Referenced by getWordStartIdx(). |
|
default set of alphanumericals.
Definition at line 35 of file CEGUITextUtils.cpp. Referenced by getNextWordStartIdx(), and getWordStartIdx(). |
|
The default set of whitespace.
Definition at line 34 of file CEGUITextUtils.cpp. Referenced by CEGUI::Font::getFormattedLineCount(), getNextWordStartIdx(), and getWordStartIdx(). |
|
The default set of word-wrap delimiters.
Definition at line 36 of file CEGUITextUtils.cpp. Referenced by CEGUI::MultiLineEditbox::getNextTokenLength(). |