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))); }
public static bool TryParseFlag(string text, FlagMode mode, out FlagValue value) => TryParseFlag(StringSlice.Create(text), mode, out value);
public static CapitalizationType GetCapitalizationType(string word, AffixConfig affix) => GetCapitalizationType(StringSlice.Create(word), affix);
public static FlagSet ParseNumberFlags(string text) => ParseNumberFlags(StringSlice.Create(text));
private static FlagValue[] ConvertCharsToFlagsInOrder(string text) => ConvertCharsToFlagsInOrder(StringSlice.Create(text));
public static FlagValue[] ParseLongFlagsInOrder(string text) => ParseLongFlagsInOrder(StringSlice.Create(text));
public static List <FlagValue> ParseNumberFlagsInOrder(string text) => ParseNumberFlagsInOrder(StringSlice.Create(text));
public static FlagValue[] ParseFlagsInOrder(string text, FlagMode mode) => ParseFlagsInOrder(StringSlice.Create(text), mode);
public static bool TryParseNumberFlag(string text, out FlagValue value) => TryParseNumberFlag(StringSlice.Create(text), out value);
private FlagValue TryParseFlag(string text) => TryParseFlag(StringSlice.Create(text));
private bool TryParseFlag(string text, out FlagValue value) => TryParseFlag(StringSlice.Create(text), out value);
private FlagValue[] ParseFlagsInOrder(string text) => ParseFlagsInOrder(StringSlice.Create(text));