Is String Format by Unicode - CSharp System

CSharp examples for System:String Unicode

Description

Is String Format by Unicode

Demo Code


using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Text;
using System.Collections.Generic;
using System.Collections;
using System;//from  w w  w .  j a  va2s .co  m

public class Main{
        internal static bool IsFormat(string str, int index)
        {
            UnicodeCategory theCat = Char.GetUnicodeCategory(str, index);
            return theCat == UnicodeCategory.Format;
        }
        internal static bool IsFormat(char chr)
        {
            UnicodeCategory theCat = Char.GetUnicodeCategory(chr);
            return theCat == UnicodeCategory.Format;
        }
}

Related Tutorials