예제 #1
0
        private StringSlice ReDecodeConvertedStringAsUtf8(StringSlice decoded)
        {
            var encoding = Builder.Encoding ?? Reader.CurrentEncoding;

            if (encoding == Encoding.UTF8)
            {
                return(decoded);
            }

            var encodedBytes     = new byte[encoding.GetMaxByteCount(decoded.Length)];
            var byteEncodedCount = encoding.GetBytes(decoded.Text, decoded.Offset, decoded.Length, encodedBytes, 0);

            return(StringSlice.Create(Encoding.UTF8.GetString(encodedBytes, 0, byteEncodedCount)));
        }
예제 #2
0
 public static bool TryParseFlag(string text, FlagMode mode, out FlagValue value) =>
 TryParseFlag(StringSlice.Create(text), mode, out value);
예제 #3
0
 public static CapitalizationType GetCapitalizationType(string word, AffixConfig affix) =>
 GetCapitalizationType(StringSlice.Create(word), affix);
예제 #4
0
 public static FlagSet ParseNumberFlags(string text) =>
 ParseNumberFlags(StringSlice.Create(text));
예제 #5
0
 private static        FlagValue[] ConvertCharsToFlagsInOrder(string text) =>
 ConvertCharsToFlagsInOrder(StringSlice.Create(text));
예제 #6
0
 public static         FlagValue[] ParseLongFlagsInOrder(string text) =>
 ParseLongFlagsInOrder(StringSlice.Create(text));
예제 #7
0
 public static List <FlagValue> ParseNumberFlagsInOrder(string text) =>
 ParseNumberFlagsInOrder(StringSlice.Create(text));
예제 #8
0
 public static         FlagValue[] ParseFlagsInOrder(string text, FlagMode mode) =>
 ParseFlagsInOrder(StringSlice.Create(text), mode);
예제 #9
0
 public static bool TryParseNumberFlag(string text, out FlagValue value) =>
 TryParseNumberFlag(StringSlice.Create(text), out value);
예제 #10
0
 private FlagValue TryParseFlag(string text) =>
 TryParseFlag(StringSlice.Create(text));
예제 #11
0
 private bool TryParseFlag(string text, out FlagValue value) =>
 TryParseFlag(StringSlice.Create(text), out value);
예제 #12
0
 private FlagValue[] ParseFlagsInOrder(string text) =>
 ParseFlagsInOrder(StringSlice.Create(text));