public static string ConvertToElementLengthInfoString(string str) { if (string.IsNullOrEmpty(str)) { return(null); } var ci = new CharInfo(str); var s = CharInfoConvertHelper.Ellipsize(ci.PrintableText, 20); return($"'{s}' | {ci.ElementCount} elements | {ci.Utf16Count} bytes (16BE) | {ci.Utf8Count} bytes (8)"); }
public static string ConvertToElementInfoString(string str) { if (string.IsNullOrEmpty(str)) { return(null); } var ci = new CharInfo(str); var s = CharInfoConvertHelper.Ellipsize(ci.PrintableText, 20); return($"'{s}' | {ci.CodePointText} | {ci.Utf16BECodeText} (16BE) | {ci.Utf8CodeText} (8)"); }