22 #ifndef FCN_UTF8STRINGEDITOR_HPP 23 #define FCN_UTF8STRINGEDITOR_HPP 28 #include <fifechan.hpp> 54 static int nextChar(
const std::string& text,
int byteOffset);
63 static int prevChar(
const std::string& text,
int byteOffset);
72 static int eraseChar(std::string& text,
int byteOffset);
82 static int insertChar(std::string& text,
int byteOffset,
int ch);
91 static int countChars(
const std::string& text,
int byteOffset);
103 static int getOffset(
const std::string& text,
int charIndex);
108 #endif // !FCN_UTF8STRINGEDITOR_HPP static int insertChar(std::string &text, int byteOffset, int ch)
Insert a character at specified byte offset.
static int nextChar(const std::string &text, int byteOffset)
Returns byte offset of the next character.
static int eraseChar(std::string &text, int byteOffset)
Erase character at specified byte offset.
static int getOffset(const std::string &text, int charIndex)
Gets byte offset for character index.
static int countChars(const std::string &text, int byteOffset)
Counts characters up to byteOffset.
static int prevChar(const std::string &text, int byteOffset)
Returns byte offset of the previous character.