Lines Matching refs:Encoding
1 //===--- Encoding.h - Format C++ code -------------------------------------===//
27 enum Encoding {
34 inline Encoding detectEncoding(StringRef Text) {
51 /// Encoding.
52 inline unsigned getCodePointCount(StringRef Text, Encoding Encoding) {
53 switch (Encoding) {
63 /// \p Encoding.
64 inline unsigned columnWidth(StringRef Text, Encoding Encoding) {
65 if (Encoding == Encoding_UTF8) {
79 /// text is assumed to use the specified \p Encoding.
81 unsigned TabWidth, Encoding Encoding) {
87 return TotalWidth + columnWidth(Tail, Encoding);
88 TotalWidth += columnWidth(Tail.substr(0, TabPos), Encoding);
95 /// codepoint and starting with FirstChar in the specified Encoding.
96 inline unsigned getCodePointNumBytes(char FirstChar, Encoding Encoding) {
97 switch (Encoding) {