コード例 #1
0
ファイル: CharInfoConverter.cs プロジェクト: suconbu/dentacs
        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)");
        }
コード例 #2
0
ファイル: CharInfoConverter.cs プロジェクト: suconbu/dentacs
        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)");
        }