5#ifndef INCLUDE_FIFECHAN_UTF8STRINGEDITOR_HPP_
6#define INCLUDE_FIFECHAN_UTF8STRINGEDITOR_HPP_
12#include "fifechan/platform.hpp"
35 static int nextChar(std::string
const & text,
int byteOffset);
44 static int prevChar(std::string
const & text,
int byteOffset);
53 static int eraseChar(std::string& text,
int byteOffset);
63 static int insertChar(std::string& text,
int byteOffset,
int ch);
72 static int countChars(std::string
const & text,
int byteOffset);
84 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.
Used replacement tokens by configure_file():