Doxygen
|
Various UTF8 related helper functions. 更多...
#include <cstdint>
#include <string>
函数 | |
std::string | convertUTF8ToLower (const std::string &input) |
Converts the input string into a lower case version, also taking into account non-ASCII characters that has a lower case variant. 更多... | |
std::string | convertUTF8ToUpper (const std::string &input) |
Converts the input string into a upper case version, also taking into account non-ASCII characters that has a upper case variant. 更多... | |
std::string | getUTF8CharAt (const std::string &input, size_t pos) |
Returns the UTF8 character found at byte position pos in the input string. 更多... | |
uint32_t | getUnicodeForUTF8CharAt (const std::string &input, size_t pos) |
Returns the 32bit Unicode value matching character at byte position pos in the UTF8 encoded input. 更多... | |
uint8_t | getUTF8CharNumBytes (char firstByte) |
Returns the number of bytes making up a single UTF8 character given the first byte in the sequence. 更多... | |
const char * | writeUTF8Char (TextStream &t, const char *s) |
Writes the UTF8 character pointed to by s to stream t and returns a pointer to the next character. 更多... | |
bool | lastUTF8CharIsMultibyte (const std::string &input) |
Returns true iff the last character in input is a multibyte character. 更多... | |
bool | isUTF8CharUpperCase (const std::string &input, size_t pos) |
Returns true iff the input string at byte position pos holds an upper case character. 更多... | |
int | isUTF8NonBreakableSpace (const char *input) |
Check if the first character pointed at by input is a non-breakable whitespace character. 更多... | |
Various UTF8 related helper functions.
See https://en.wikipedia.org/wiki/UTF-8 for details on UTF8 encoding.
在文件 utf8.h 中定义.
std::string convertUTF8ToLower | ( | const std::string & | input | ) |
Converts the input string into a lower case version, also taking into account non-ASCII characters that has a lower case variant.
引用了 asciiToLower(), caseConvert() , 以及 convertUnicodeToLower().
被这些函数引用 addClassMemberNameToIndex(), addFileMemberNameToIndex(), addMemberToSearchIndex(), addNamespaceMemberNameToIndex(), createJavaScriptSearchIndex(), QCString::lower() , 以及 searchId().
std::string convertUTF8ToUpper | ( | const std::string & | input | ) |
Converts the input string into a upper case version, also taking into account non-ASCII characters that has a upper case variant.
引用了 asciiToUpper(), caseConvert() , 以及 convertUnicodeToUpper().
被这些函数引用 FilterAlphaIndex::determineSortKey(), QCString::upper() , 以及 writeAlphabeticalClassList().
uint32_t getUnicodeForUTF8CharAt | ( | const std::string & | input, |
size_t | pos | ||
) |
Returns the 32bit Unicode value matching character at byte position pos in the UTF8 encoded input.
引用了 convertUTF8CharToUnicode() , 以及 getUTF8CharAt().
std::string getUTF8CharAt | ( | const std::string & | input, |
size_t | pos | ||
) |
Returns the UTF8 character found at byte position pos in the input string.
The resulting string can be a multi byte sequence.
被这些函数引用 addClassMemberNameToIndex(), addFileMemberNameToIndex(), addMemberToSearchIndex(), addNamespaceMemberNameToIndex(), createJavaScriptSearchIndex(), FilterAlphaIndex::determineSortKey(), getUnicodeForUTF8CharAt() , 以及 writeAlphabeticalClassList().
uint8_t getUTF8CharNumBytes | ( | char | firstByte | ) |
Returns the number of bytes making up a single UTF8 character given the first byte in the sequence.
被这些函数引用 Markdown::detab(), escapeCharsInString(), getUTF8CharAt(), nextUTF8CharPosition() , 以及 writeUTF8Char().
bool isUTF8CharUpperCase | ( | const std::string & | input, |
size_t | pos | ||
) |
Returns true iff the input string at byte position pos holds an upper case character.
引用了 convertUnicodeToLower() , 以及 convertUTF8CharToUnicode().
int isUTF8NonBreakableSpace | ( | const char * | input | ) |
Check if the first character pointed at by input is a non-breakable whitespace character.
Returns the byte size of the character if there is match or 0 if not.
被这些函数引用 Markdown::detab().
bool lastUTF8CharIsMultibyte | ( | const std::string & | input | ) |
Returns true iff the last character in input is a multibyte character.
const char* writeUTF8Char | ( | TextStream & | t, |
const char * | s | ||
) |
Writes the UTF8 character pointed to by s to stream t and returns a pointer to the next character.
引用了 getUTF8CharNumBytes() , 以及 TextStream::write().
被这些函数引用 HtmlCodeGenerator::codify(), ManGenerator::codify(), RTFGenerator::codify() , 以及 writeXMLCodeString().