|
clang
3.8.0
|
Enumerations | |
| enum | Encoding { Encoding_UTF8, Encoding_Unknown } |
Functions | |
| Encoding | detectEncoding (StringRef Text) |
| Detects encoding of the Text. More... | |
| unsigned | getCodePointCountUTF8 (StringRef Text) |
| unsigned | getCodePointCount (StringRef Text, Encoding Encoding) |
| Gets the number of code points in the Text using the specified Encoding. More... | |
| unsigned | columnWidth (StringRef Text, Encoding Encoding) |
Returns the number of columns required to display the Text on a generic Unicode-capable terminal. More... | |
| unsigned | columnWidthWithTabs (StringRef Text, unsigned StartColumn, unsigned TabWidth, Encoding Encoding) |
Returns the number of columns required to display the Text, starting from the StartColumn on a terminal with the TabWidth. More... | |
| unsigned | getCodePointNumBytes (char FirstChar, Encoding Encoding) |
| Gets the number of bytes in a sequence representing a single codepoint and starting with FirstChar in the specified Encoding. More... | |
| bool | isOctDigit (char c) |
| bool | isHexDigit (char c) |
| unsigned | getEscapeSequenceLength (StringRef Text) |
| Gets the length of an escape sequence inside a C++ string literal. More... | |
| Enumerator | |
|---|---|
| Encoding_UTF8 | |
| Encoding_Unknown | |
Definition at line 27 of file Encoding.h.
Returns the number of columns required to display the Text on a generic Unicode-capable terminal.
Text is assumed to use the specified Encoding.
Definition at line 64 of file Encoding.h.
References Encoding_UTF8.
Referenced by buildFixItInsertionLine(), byteToColumn(), columnToByte(), columnWidthWithTabs(), and selectInterestingSourceRegion().
|
inline |
Returns the number of columns required to display the Text, starting from the StartColumn on a terminal with the TabWidth.
The text is assumed to use the specified Encoding.
Definition at line 80 of file Encoding.h.
References columnWidth(), and Text.
Referenced by clang::format::getCommentSplit(), clang::format::BreakableSingleLineToken::getLineLengthAfterSplit(), clang::format::BreakableBlockComment::getLineLengthAfterSplit(), and clang::format::getStringSplit().
|
inline |
Detects encoding of the Text.
If the Text can be decoded using UTF-8, it is considered UTF8, otherwise we treat it as some 8-bit encoding.
Definition at line 34 of file Encoding.h.
References Encoding_Unknown, and Encoding_UTF8.
Gets the number of code points in the Text using the specified Encoding.
Definition at line 52 of file Encoding.h.
References Encoding_UTF8, and getCodePointCountUTF8().
|
inline |
Definition at line 42 of file Encoding.h.
Referenced by getCodePointCount().
Gets the number of bytes in a sequence representing a single codepoint and starting with FirstChar in the specified Encoding.
Definition at line 96 of file Encoding.h.
References Encoding_UTF8.
Referenced by clang::format::getCommentSplit(), and clang::format::getStringSplit().
|
inline |
Gets the length of an escape sequence inside a C++ string literal.
Text should span from the beginning of the escape sequence (starting with a backslash) to the end of the string literal.
Definition at line 115 of file Encoding.h.
References I, isHexDigit(), and isOctDigit().
Referenced by clang::format::getStringSplit().
|
inline |
Definition at line 107 of file Encoding.h.
Referenced by getEscapeSequenceLength().
|
inline |
Definition at line 105 of file Encoding.h.
Referenced by getEscapeSequenceLength().
1.8.6