10 #ifndef _STRUS_BASE_UTF8_ENCODING_DECODING_HPP_INCLUDED
11 #define _STRUS_BASE_UTF8_ENCODING_DECODING_HPP_INCLUDED
51 static inline const char*
utf8prev(
char const* end)
67 int32_t
utf8decode(
const char* itr,
unsigned int charsize);
70 std::size_t
utf8encode(
char* buf, int32_t chr);
static unsigned int bitScanReverse(const uint32_t &idx)
Definition: bitOperations.hpp:52
static unsigned char utf8charlen(unsigned char ch)
Get the lenght of an UTF-8 encoded character from its first byte.
Definition: utf8.hpp:60
static bool utf8midchr(unsigned char ch)
Return true, if the character passed as argument is a non start character of a multi byte encoded uni...
Definition: utf8.hpp:43
static const char * utf8prev(char const *end)
Skip to the begin of an UTF-8 encoded character from a pointer into it.
Definition: utf8.hpp:51
std::size_t utf8encode(char *buf, int32_t chr)
Encoding of a single UTF-8 character into a string buffer.
int32_t utf8decode(const char *itr, unsigned int charsize)
Decoding of a single UTF-8 character in a string.