5#ifndef INCLUDE_FIFECHAN_UTF8STRINGEDITOR_HPP_
6#define INCLUDE_FIFECHAN_UTF8STRINGEDITOR_HPP_
32 static int nextChar(std::string
const & text,
int byteOffset);
41 static int prevChar(std::string
const & text,
int byteOffset);
50 static int eraseChar(std::string& text,
int byteOffset);
60 static int insertChar(std::string& text,
int byteOffset,
int ch);
69 static int countChars(std::string
const & text,
int byteOffset);
81 static int getOffset(std::string
const & text,
int charIndex);
Utility for editing and handling UTF-8 encoded strings.
static int insertChar(std::string &text, int byteOffset, int ch)
Insert a character at specified byte offset.
static int countChars(std::string const &text, int byteOffset)
Counts characters up to byteOffset.
static int eraseChar(std::string &text, int byteOffset)
Erase character at specified byte offset.
static int getOffset(std::string const &text, int charIndex)
Gets byte offset for character index.
static int nextChar(std::string const &text, int byteOffset)
Returns byte offset of the next character.
static int prevChar(std::string const &text, int byteOffset)
Returns byte offset of the previous character.