Lines Matching full:encoding
1 //===--- Encoding.h - Format C++ code ---------------------------*- C++ -*-===//
10 /// Contains functions for text encoding manipulation. Supports UTF-8,
24 namespace encoding {
26 enum Encoding { enum
31 /// Detects encoding of the Text. If the Text can be decoded using UTF-8,
32 /// it is considered UTF8, otherwise we treat it as some 8-bit encoding.
33 inline Encoding detectEncoding(StringRef Text) { in detectEncoding()
43 /// \p Encoding.
44 inline unsigned columnWidth(StringRef Text, Encoding Encoding) { in columnWidth() argument
45 if (Encoding == Encoding_UTF8) { in columnWidth()
59 /// text is assumed to use the specified \p Encoding.
61 unsigned TabWidth, Encoding Encoding) { in columnWidthWithTabs() argument
67 return TotalWidth + columnWidth(Tail, Encoding); in columnWidthWithTabs()
68 TotalWidth += columnWidth(Tail.substr(0, TabPos), Encoding); in columnWidthWithTabs()
76 /// codepoint and starting with FirstChar in the specified Encoding.
77 inline unsigned getCodePointNumBytes(char FirstChar, Encoding Encoding) { in getCodePointNumBytes() argument
78 switch (Encoding) { in getCodePointNumBytes()
123 } // namespace encoding