internal static int GetBidiClass(int ch) { ByteData table = null; lock (ValueBidiClassesSync) { bidiClasses = bidiClasses ?? ByteData.Decompress(IdnaData.BidiClasses); table = bidiClasses; } return table.GetByte(ch); }
public static int GetCombiningClass(int cp) { if (cp < 0x300 || cp >= 0xe0000) { return 0; } if (classes == null) { lock (syncRoot) { classes = classes ?? ByteData.Decompress(NormalizationData.CombiningClasses); } } return ((int)classes.GetByte(cp)) & 0xff; }
public static bool IsQuickCheckStarter(int cp, Normalization form) { // Code points for which QuickCheck = YES and with a combining // class of 0 ByteData bd = null; if (form == Normalization.NFC && (cp < NormalizationData.QCSNFCMin || cp > NormalizationData.QCSNFCMax)) { return true; } if (form == Normalization.NFD && (cp < NormalizationData.QCSNFDMin || cp > NormalizationData.QCSNFDMax)) { return true; } if (form == Normalization.NFKC && (cp < NormalizationData.QCSNFKCMin || cp > NormalizationData.QCSNFKCMax)) { return true; } if (form == Normalization.NFKD && (cp < NormalizationData.QCSNFKDMin || cp > NormalizationData.QCSNFKDMax)) { return true; } if (form == Normalization.NFC) { if (qcsnfc == null) { lock (syncRoot) { qcsnfc = qcsnfc ?? ByteData.Decompress(NormalizationData.QCSNFC); } } bd = qcsnfc; } if (form == Normalization.NFD) { if (qcsnfd == null) { lock (syncRoot) { qcsnfd = qcsnfd ?? ByteData.Decompress(NormalizationData.QCSNFD); } } bd = qcsnfd; } if (form == Normalization.NFKC) { if (qcsnfkc == null) { lock (syncRoot) { qcsnfkc = qcsnfkc ?? ByteData.Decompress(NormalizationData.QCSNFKC); } } bd = qcsnfkc; } if (form == Normalization.NFKD) { if (qcsnfkd == null) { lock (syncRoot) { qcsnfkd = qcsnfkd ?? ByteData.Decompress(NormalizationData.QCSNFKD); } } bd = qcsnfkd; } return bd != null && bd.GetBoolean(cp); }
public static bool IsCombiningMark(int cp) { if (combmark == null) { lock (syncRoot) { combmark = combmark ?? ByteData.Decompress(IdnaData.CombiningMarks); } } return combmark.GetBoolean(cp); }
public static int GetIdnaCategory(int cp) { if (idnaCat == null) { lock (syncRoot) { idnaCat = idnaCat ?? ByteData.Decompress(IdnaData.IdnaCategories); } } return ((int)idnaCat.GetByte(cp)) & 0xff; }
private static int GetScript(int ch) { ByteData table = null; if (scripts == null) { lock (syncRoot) { scripts = scripts ?? ByteData.Decompress(IdnaData.IdnaRelevantScripts); } } table = scripts; return table.GetByte(ch); }
private static int GetJoiningType(int ch) { ByteData table = null; if (joiningTypes == null) { lock (syncRoot) { joiningTypes = joiningTypes ?? ByteData.Decompress(IdnaData.JoiningTypes); } } table = joiningTypes; return table.GetByte(ch); }
internal static int GetBidiClass(int ch) { ByteData table = null; if (bidiClasses == null) { lock (syncRoot) { bidiClasses = bidiClasses ?? ByteData.Decompress(IdnaData.BidiClasses); } } table = bidiClasses; return table.GetByte(ch); }
public static int GetCombiningClass(int cp) { lock (ValueClassesSyncRoot) { classes = classes ?? ByteData.Decompress(NormalizationData.CombiningClasses); } return ((int)classes.GetByte(cp)) & 0xff; }
public static bool IsCombiningMark(int cp) { lock (ValueCmSyncRoot) { combmark = combmark ?? ByteData.Decompress(IdnaData.CombiningMarks); return combmark.GetBoolean(cp); } }
private static int GetScript(int ch) { ByteData table = null; lock (ValueScriptsSync) { scripts = scripts ?? ByteData.Decompress(IdnaData.IdnaRelevantScripts); table = scripts; } return table.GetByte(ch); }
private static int GetJoiningType(int ch) { ByteData table = null; lock (ValueJoiningTypesSync) { joiningTypes = joiningTypes ?? ByteData.Decompress(IdnaData.JoiningTypes); table = joiningTypes; } return table.GetByte(ch); }