using System;
using System.Globalization;
public class Test
{
public static void Main()
{
Console.WriteLine("🔹".Length);
Console.WriteLine(new StringInfo("🔹").LengthInTextElements);
var myString = @"This is a string before an emoji:🔹This is after the emoji.";
var teMyString = new StringInfo(myString);
Console.WriteLine(teMyString.SubstringByTextElements(0, 33));
Console.WriteLine(teMyString.SubstringByTextElements(0, 34));
Console.WriteLine(teMyString.SubstringByTextElements(0, 35));
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uR2xvYmFsaXphdGlvbjsKCnB1YmxpYyBjbGFzcyBUZXN0CnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBNYWluKCkKCXsKCQlDb25zb2xlLldyaXRlTGluZSgi8J+UuSIuTGVuZ3RoKTsKCQlDb25zb2xlLldyaXRlTGluZShuZXcgU3RyaW5nSW5mbygi8J+UuSIpLkxlbmd0aEluVGV4dEVsZW1lbnRzKTsKCgkJdmFyIG15U3RyaW5nID0gQCJUaGlzIGlzIGEgc3RyaW5nIGJlZm9yZSBhbiBlbW9qaTrwn5S5VGhpcyBpcyBhZnRlciB0aGUgZW1vamkuIjsKCQl2YXIgdGVNeVN0cmluZyA9IG5ldyBTdHJpbmdJbmZvKG15U3RyaW5nKTsKCQlDb25zb2xlLldyaXRlTGluZSh0ZU15U3RyaW5nLlN1YnN0cmluZ0J5VGV4dEVsZW1lbnRzKDAsIDMzKSk7CgkJQ29uc29sZS5Xcml0ZUxpbmUodGVNeVN0cmluZy5TdWJzdHJpbmdCeVRleHRFbGVtZW50cygwLCAzNCkpOwoJCUNvbnNvbGUuV3JpdGVMaW5lKHRlTXlTdHJpbmcuU3Vic3RyaW5nQnlUZXh0RWxlbWVudHMoMCwgMzUpKTsKCQkKCX0KfQ==