|
FIFE
|
UTF-8 string editor. More...
#include <utf8stringeditor.h>
Collaboration diagram for gcn::UTF8StringEditor:Static Public Member Functions | |
| static int | nextChar (const std::string &text, int byteOffset) |
| Returns byte offset of the next character. More... | |
| static int | prevChar (const std::string &text, int byteOffset) |
| Returns byte offset of the previous character. More... | |
| static int | eraseChar (std::string &text, int byteOffset) |
| Erase character at specified byte offset. More... | |
| static int | insertChar (std::string &text, int byteOffset, int ch) |
| Insert a character at specified byte offset. More... | |
| static int | countChars (const std::string &text, int byteOffset) |
| Counts characters up to byteOffset. More... | |
| static int | getOffset (const std::string &text, int charIndex) |
| Gets byte offset for character index. More... | |
UTF-8 string editor.
This is a helper class which allows to use UTF-8 strings in your application.
Definition at line 45 of file utf8stringeditor.h.
|
static |
Counts characters up to byteOffset.
| text | UTF-8 text to navigate. |
| byteOffset | Byte offset inside the text. |
Definition at line 91 of file utf8stringeditor.cpp.
References utf8::distance().
Referenced by gcn::UTF8TextBox::keyPressed(), and gcn::UTF8TextBox::setCaretRowUTF8().
Here is the caller graph for this function:
|
static |
Erase character at specified byte offset.
| text | UTF-8 text to modify. |
| byteOffset | Byte offset of the character to erase. |
Definition at line 58 of file utf8stringeditor.cpp.
References utf8::next().
Referenced by gcn::UTF8TextField::keyPressed(), and gcn::UTF8TextBox::keyPressed().
Here is the caller graph for this function:
|
static |
Gets byte offset for character index.
This method automaticly clips charIndex to be inside the string + EOF
| text | UTF-8 text to navigate. |
| charIndex | Character index to move to. |
Definition at line 96 of file utf8stringeditor.cpp.
References utf8::next().
Referenced by gcn::UTF8TextBox::keyPressed(), gcn::UTF8TextBox::setCaretColumnUTF8(), and gcn::UTF8TextBox::setCaretRowUTF8().
Here is the caller graph for this function:
|
static |
Insert a character at specified byte offset.
| text | UTF-8 text to modify. |
| byteOffset | Byte offset where character will be inserted. |
| ch | Unicode character to insert. |
Definition at line 69 of file utf8stringeditor.cpp.
References utf8::append(), and utf8::next().
Referenced by gcn::UTF8TextField::keyPressed(), and gcn::UTF8TextBox::keyPressed().
Here is the caller graph for this function:
|
static |
Returns byte offset of the next character.
| text | UTF-8 text to navigate. |
| byteOffset | Byte offset of current character. |
Definition at line 36 of file utf8stringeditor.cpp.
References utf8::next().
Referenced by gcn::UTF8TextField::keyPressed(), and gcn::UTF8TextBox::keyPressed().
Here is the caller graph for this function:
|
static |
Returns byte offset of the previous character.
| text | UTF-8 text to navigate. |
| byteOffset | Byte offset of current character. |
Definition at line 47 of file utf8stringeditor.cpp.
References utf8::prior().
Referenced by gcn::UTF8TextField::keyPressed(), and gcn::UTF8TextBox::keyPressed().
Here is the caller graph for this function: