The utf8.h
File Reference
Various UTF8 related helper functions. More...
Included Headers
Functions Index
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. More... | |
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. More... | |
std::string | getUTF8CharAt (const std::string &input, size_t pos) |
Returns the UTF8 character found at byte position pos in the input string. More... | |
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. More... | |
uint8_t | getUTF8CharNumBytes (char firstByte) |
Returns the number of bytes making up a single UTF8 character given the first byte in the sequence. More... | |
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. More... | |
bool | lastUTF8CharIsMultibyte (const std::string &input) |
Returns true iff the last character in input is a multibyte character. More... | |
bool | isUTF8CharUpperCase (const std::string &input, size_t pos) |
Returns true iff the input string at byte position pos holds an upper case character. More... | |
int | isUTF8NonBreakableSpace (const char *input) |
Check if the first character pointed at by input is a non-breakable whitespace character. More... | |
bool | isUTF8PunctuationCharacter (uint32_t unicode) |
Check if the given Unicode character represents a punctuation character. More... | |
Description
Various UTF8 related helper functions.
See https://en.wikipedia.org/wiki/UTF-8 for details on UTF8 encoding.
Functions
convertUTF8ToLower()
|
Converts the input string into a lower case version, also taking into account non-ASCII characters that has a lower case variant.
Declaration at line 34 of file utf8.h, definition at line 187 of file utf8.cpp.
References asciiToLower, caseConvert and convertUnicodeToLower.
Referenced by SearchIndexInfo::add, Index::addClassMemberNameToIndex, Index::addFileMemberNameToIndex, Index::addModuleMemberNameToIndex, Index::addNamespaceMemberNameToIndex, AnchorGenerator::generate, QCString::lower, FileNameFn::searchKey, SearchTerm::termEncoded and HtmlGenerator::writeLabel.
convertUTF8ToUpper()
|
Converts the input string into a upper case version, also taking into account non-ASCII characters that has a upper case variant.
Declaration at line 39 of file utf8.h, definition at line 192 of file utf8.cpp.
References asciiToUpper, caseConvert and convertUnicodeToUpper.
Referenced by Translator::createNoun, QCString::upper and writeAlphabeticalClassList.
getUnicodeForUTF8CharAt()
|
Returns the 32bit Unicode value matching character at byte position pos in the UTF8 encoded input.
Declaration at line 49 of file utf8.h, definition at line 135 of file utf8.cpp.
References convertUTF8CharToUnicode and getUTF8CharAt.
Referenced by AnchorGenerator::generate.
getUTF8CharAt()
|
Returns the UTF8 character found at byte position pos in the input string.
The resulting string can be a multi byte sequence.
Declaration at line 44 of file utf8.h, definition at line 127 of file utf8.cpp.
Reference getUTF8CharNumBytes.
Referenced by SearchIndexInfo::add, Index::addClassMemberNameToIndex, Index::addFileMemberNameToIndex, Index::addModuleMemberNameToIndex, Index::addNamespaceMemberNameToIndex, Translator::createNoun, AnchorGenerator::generate, getUnicodeForUTF8CharAt and writeAlphabeticalClassList.
getUTF8CharNumBytes()
|
Returns the number of bytes making up a single UTF8 character given the first byte in the sequence.
Declaration at line 54 of file utf8.h, definition at line 23 of file utf8.cpp.
Referenced by detab, escapeCharsInString, AnchorGenerator::generate, getUTF8CharAt, nextUTF8CharPosition, updateColumnCount and writeUTF8Char.
isUTF8CharUpperCase()
|
Returns true iff the input string at byte position pos holds an upper case character.
Declaration at line 65 of file utf8.h, definition at line 218 of file utf8.cpp.
References convertUnicodeToLower and convertUTF8CharToUnicode.
Referenced by DefinitionImpl::_setBriefDescription.
isUTF8NonBreakableSpace()
|
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.
Declaration at line 70 of file utf8.h, definition at line 228 of file utf8.cpp.
Referenced by detab.
isUTF8PunctuationCharacter()
|
Check if the given Unicode character represents a punctuation character.
Declaration at line 73 of file utf8.h, definition at line 234 of file utf8.cpp.
Reference isPunctuationCharacter.
Referenced by AnchorGenerator::generate.
lastUTF8CharIsMultibyte()
|
Returns true iff the last character in input is a multibyte character.
Declaration at line 62 of file utf8.h, definition at line 212 of file utf8.cpp.
Referenced by DefinitionImpl::_setBriefDescription.
writeUTF8Char()
|
Writes the UTF8 character pointed to by s to stream t and returns a pointer to the next character.
Declaration at line 59 of file utf8.h, definition at line 197 of file utf8.cpp.
References getUTF8CharNumBytes and TextStream::write.
Referenced by HtmlCodeGenerator::codify, ManCodeGenerator::codify, RTFCodeGenerator::codify, HtmlDocVisitor::operator(), HtmlDocVisitor::writeObfuscatedMailAddress and writeXMLCodeString.
Generated via doxygen2docusaurus by Doxygen 1.14.0.