844 references to UnicodeCategory
Aspire.Hosting.Azure (2)
Utils\ResourceGroupNameHelpers.cs (2)
47var unicodeCategory = CharUnicodeInfo.GetUnicodeCategory(c); 48if (unicodeCategory != UnicodeCategory.NonSpacingMark)
dotnet-svcutil-lib (64)
FrameworkFork\Microsoft.CodeDom\Compiler\CodeGenerator.cs (11)
2219UnicodeCategory uc = CharUnicodeInfo.GetUnicodeCategory(ch); 2222case UnicodeCategory.UppercaseLetter: // Lu 2223case UnicodeCategory.LowercaseLetter: // Ll 2224case UnicodeCategory.TitlecaseLetter: // Lt 2225case UnicodeCategory.ModifierLetter: // Lm 2226case UnicodeCategory.LetterNumber: // Lm 2227case UnicodeCategory.OtherLetter: // Lo 2231case UnicodeCategory.NonSpacingMark: // Mn 2232case UnicodeCategory.SpacingCombiningMark: // Mc 2233case UnicodeCategory.ConnectorPunctuation: // Pc 2234case UnicodeCategory.DecimalDigitNumber: // Nd
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeIdentifier.cs (31)
112UnicodeCategory uc = CharUnicodeInfo.GetUnicodeCategory(c); 118case UnicodeCategory.UppercaseLetter: // Lu 119case UnicodeCategory.LowercaseLetter: // Ll 120case UnicodeCategory.TitlecaseLetter: // Lt 121case UnicodeCategory.ModifierLetter: // Lm 122case UnicodeCategory.OtherLetter: // Lo 123case UnicodeCategory.DecimalDigitNumber: // Nd 124case UnicodeCategory.NonSpacingMark: // Mn 125case UnicodeCategory.SpacingCombiningMark: // Mc 126case UnicodeCategory.ConnectorPunctuation: // Pc 128case UnicodeCategory.LetterNumber: 129case UnicodeCategory.OtherNumber: 130case UnicodeCategory.EnclosingMark: 131case UnicodeCategory.SpaceSeparator: 132case UnicodeCategory.LineSeparator: 133case UnicodeCategory.ParagraphSeparator: 134case UnicodeCategory.Control: 135case UnicodeCategory.Format: 136case UnicodeCategory.Surrogate: 137case UnicodeCategory.PrivateUse: 138case UnicodeCategory.DashPunctuation: 139case UnicodeCategory.OpenPunctuation: 140case UnicodeCategory.ClosePunctuation: 141case UnicodeCategory.InitialQuotePunctuation: 142case UnicodeCategory.FinalQuotePunctuation: 143case UnicodeCategory.OtherPunctuation: 144case UnicodeCategory.MathSymbol: 145case UnicodeCategory.CurrencySymbol: 146case UnicodeCategory.ModifierSymbol: 147case UnicodeCategory.OtherSymbol: 148case UnicodeCategory.OtherNotAssigned:
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (11)
1519return (CharUnicodeInfo.GetUnicodeCategory(c) != UnicodeCategory.DecimalDigitNumber); 1524UnicodeCategory uc = CharUnicodeInfo.GetUnicodeCategory(c); 1530case UnicodeCategory.UppercaseLetter: // Lu 1531case UnicodeCategory.LowercaseLetter: // Ll 1532case UnicodeCategory.TitlecaseLetter: // Lt 1533case UnicodeCategory.ModifierLetter: // Lm 1534case UnicodeCategory.OtherLetter: // Lo 1535case UnicodeCategory.DecimalDigitNumber: // Nd 1536case UnicodeCategory.NonSpacingMark: // Mn 1537case UnicodeCategory.SpacingCombiningMark: // Mc 1538case UnicodeCategory.ConnectorPunctuation: // Pc
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\UniqueCodeIdentifierScope.cs (11)
62return (CharUnicodeInfo.GetUnicodeCategory(c) != UnicodeCategory.DecimalDigitNumber); 67UnicodeCategory uc = CharUnicodeInfo.GetUnicodeCategory(c); 73case UnicodeCategory.UppercaseLetter: // Lu 74case UnicodeCategory.LowercaseLetter: // Ll 75case UnicodeCategory.TitlecaseLetter: // Lt 76case UnicodeCategory.ModifierLetter: // Lm 77case UnicodeCategory.OtherLetter: // Lo 78case UnicodeCategory.DecimalDigitNumber: // Nd 79case UnicodeCategory.NonSpacingMark: // Mn 80case UnicodeCategory.SpacingCombiningMark: // Mc 81case UnicodeCategory.ConnectorPunctuation: // Pc
Metrics (12)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (12)
269UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 280UnicodeCategory.UppercaseLetter 281or UnicodeCategory.LowercaseLetter 282or UnicodeCategory.TitlecaseLetter 283or UnicodeCategory.ModifierLetter 284or UnicodeCategory.OtherLetter 285or UnicodeCategory.LetterNumber 286or UnicodeCategory.DecimalDigitNumber 287or UnicodeCategory.ConnectorPunctuation 288or UnicodeCategory.NonSpacingMark 289or UnicodeCategory.SpacingCombiningMark 290or UnicodeCategory.Format => true,
Metrics.Legacy (12)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (12)
269UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 280UnicodeCategory.UppercaseLetter 281or UnicodeCategory.LowercaseLetter 282or UnicodeCategory.TitlecaseLetter 283or UnicodeCategory.ModifierLetter 284or UnicodeCategory.OtherLetter 285or UnicodeCategory.LetterNumber 286or UnicodeCategory.DecimalDigitNumber 287or UnicodeCategory.ConnectorPunctuation 288or UnicodeCategory.NonSpacingMark 289or UnicodeCategory.SpacingCombiningMark 290or UnicodeCategory.Format => true,
Microsoft.Build.Tasks.CodeAnalysis (17)
src\Compilers\Core\Portable\InternalUtilities\UnicodeCharacterUtilities.cs (17)
80UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 115private static bool IsLetterChar(UnicodeCategory cat) 123case UnicodeCategory.UppercaseLetter: 124case UnicodeCategory.LowercaseLetter: 125case UnicodeCategory.TitlecaseLetter: 126case UnicodeCategory.ModifierLetter: 127case UnicodeCategory.OtherLetter: 128case UnicodeCategory.LetterNumber: 135private static bool IsCombiningChar(UnicodeCategory cat) 143case UnicodeCategory.NonSpacingMark: 144case UnicodeCategory.SpacingCombiningMark: 151private static bool IsDecimalDigitChar(UnicodeCategory cat) 157return cat == UnicodeCategory.DecimalDigitNumber; 160private static bool IsConnectingChar(UnicodeCategory cat) 166return cat == UnicodeCategory.ConnectorPunctuation; 184private static bool IsFormattingChar(UnicodeCategory cat) 190return cat == UnicodeCategory.Format;
Microsoft.Build.Tasks.Core (22)
CreateManifestResourceName.cs (6)
286CharUnicodeInfo.GetUnicodeCategory(c) == UnicodeCategory.ConnectorPunctuation; 294UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(c); 298cat == UnicodeCategory.ConnectorPunctuation || 299cat == UnicodeCategory.NonSpacingMark || 300cat == UnicodeCategory.SpacingCombiningMark || 301cat == UnicodeCategory.EnclosingMark;
tokenChar.cs (16)
37UnicodeCategory cat = System.Globalization.CharUnicodeInfo.GetUnicodeCategory(c); 42cat == UnicodeCategory.UppercaseLetter 43|| cat == UnicodeCategory.LowercaseLetter 44|| cat == UnicodeCategory.TitlecaseLetter 45|| cat == UnicodeCategory.ModifierLetter 46|| cat == UnicodeCategory.OtherLetter 47|| cat == UnicodeCategory.LetterNumber) 61UnicodeCategory cat = System.Globalization.CharUnicodeInfo.GetUnicodeCategory(c); 66cat == UnicodeCategory.DecimalDigitNumber) 80UnicodeCategory cat = System.Globalization.CharUnicodeInfo.GetUnicodeCategory(c); 86cat == UnicodeCategory.ConnectorPunctuation) 100UnicodeCategory cat = System.Globalization.CharUnicodeInfo.GetUnicodeCategory(c); 105cat == UnicodeCategory.NonSpacingMark // Mn 106|| cat == UnicodeCategory.SpacingCombiningMark) // Mc 120UnicodeCategory cat = System.Globalization.CharUnicodeInfo.GetUnicodeCategory(c); 125cat == UnicodeCategory.Format) // Cf
Microsoft.Cci.Extensions (7)
Writers\CSharp\CSDeclarationWriter.Attributes.cs (7)
362var cat = CharUnicodeInfo.GetUnicodeCategory(c); 363if (cat == UnicodeCategory.Control || 364cat == UnicodeCategory.LineSeparator || 365cat == UnicodeCategory.Format || 366cat == UnicodeCategory.Surrogate || 367cat == UnicodeCategory.PrivateUse || 368cat == UnicodeCategory.OtherNotAssigned)
Microsoft.CodeAnalysis (17)
InternalUtilities\UnicodeCharacterUtilities.cs (17)
80UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 115private static bool IsLetterChar(UnicodeCategory cat) 123case UnicodeCategory.UppercaseLetter: 124case UnicodeCategory.LowercaseLetter: 125case UnicodeCategory.TitlecaseLetter: 126case UnicodeCategory.ModifierLetter: 127case UnicodeCategory.OtherLetter: 128case UnicodeCategory.LetterNumber: 135private static bool IsCombiningChar(UnicodeCategory cat) 143case UnicodeCategory.NonSpacingMark: 144case UnicodeCategory.SpacingCombiningMark: 151private static bool IsDecimalDigitChar(UnicodeCategory cat) 157return cat == UnicodeCategory.DecimalDigitNumber; 160private static bool IsConnectingChar(UnicodeCategory cat) 166return cat == UnicodeCategory.ConnectorPunctuation; 184private static bool IsFormattingChar(UnicodeCategory cat) 190return cat == UnicodeCategory.Format;
Microsoft.CodeAnalysis.Analyzers (12)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (12)
269UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 280UnicodeCategory.UppercaseLetter 281or UnicodeCategory.LowercaseLetter 282or UnicodeCategory.TitlecaseLetter 283or UnicodeCategory.ModifierLetter 284or UnicodeCategory.OtherLetter 285or UnicodeCategory.LetterNumber 286or UnicodeCategory.DecimalDigitNumber 287or UnicodeCategory.ConnectorPunctuation 288or UnicodeCategory.NonSpacingMark 289or UnicodeCategory.SpacingCombiningMark 290or UnicodeCategory.Format => true,
Microsoft.CodeAnalysis.AnalyzerUtilities (12)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (12)
269UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 280UnicodeCategory.UppercaseLetter 281or UnicodeCategory.LowercaseLetter 282or UnicodeCategory.TitlecaseLetter 283or UnicodeCategory.ModifierLetter 284or UnicodeCategory.OtherLetter 285or UnicodeCategory.LetterNumber 286or UnicodeCategory.DecimalDigitNumber 287or UnicodeCategory.ConnectorPunctuation 288or UnicodeCategory.NonSpacingMark 289or UnicodeCategory.SpacingCombiningMark 290or UnicodeCategory.Format => true,
Microsoft.CodeAnalysis.BannedApiAnalyzers (12)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (12)
269UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 280UnicodeCategory.UppercaseLetter 281or UnicodeCategory.LowercaseLetter 282or UnicodeCategory.TitlecaseLetter 283or UnicodeCategory.ModifierLetter 284or UnicodeCategory.OtherLetter 285or UnicodeCategory.LetterNumber 286or UnicodeCategory.DecimalDigitNumber 287or UnicodeCategory.ConnectorPunctuation 288or UnicodeCategory.NonSpacingMark 289or UnicodeCategory.SpacingCombiningMark 290or UnicodeCategory.Format => true,
Microsoft.CodeAnalysis.CodeStyle (17)
src\Compilers\Core\Portable\InternalUtilities\UnicodeCharacterUtilities.cs (17)
80UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 115private static bool IsLetterChar(UnicodeCategory cat) 123case UnicodeCategory.UppercaseLetter: 124case UnicodeCategory.LowercaseLetter: 125case UnicodeCategory.TitlecaseLetter: 126case UnicodeCategory.ModifierLetter: 127case UnicodeCategory.OtherLetter: 128case UnicodeCategory.LetterNumber: 135private static bool IsCombiningChar(UnicodeCategory cat) 143case UnicodeCategory.NonSpacingMark: 144case UnicodeCategory.SpacingCombiningMark: 151private static bool IsDecimalDigitChar(UnicodeCategory cat) 157return cat == UnicodeCategory.DecimalDigitNumber; 160private static bool IsConnectingChar(UnicodeCategory cat) 166return cat == UnicodeCategory.ConnectorPunctuation; 184private static bool IsFormattingChar(UnicodeCategory cat) 190return cat == UnicodeCategory.Format;
Microsoft.CodeAnalysis.CSharp (10)
Parser\CharacterInfo.cs (1)
142|| (ch > 255 && CharUnicodeInfo.GetUnicodeCategory(ch) == UnicodeCategory.SpaceSeparator);
SymbolDisplay\ObjectDisplay.cs (9)
189private static bool NeedsEscaping(UnicodeCategory category) 193case UnicodeCategory.Control: 194case UnicodeCategory.OtherNotAssigned: 195case UnicodeCategory.ParagraphSeparator: 196case UnicodeCategory.LineSeparator: 197case UnicodeCategory.Surrogate: 242if (escapeNonPrintable && CharUnicodeInfo.GetUnicodeCategory(c) == UnicodeCategory.Surrogate) 244var category = CharUnicodeInfo.GetUnicodeCategory(value, i); 245if (category == UnicodeCategory.Surrogate)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (2)
183=> Rune.GetUnicodeCategory(rune) is UnicodeCategory.Control or UnicodeCategory.Format
Microsoft.CodeAnalysis.CSharp.EditorFeatures (9)
StringCopyPaste\StringCopyPasteHelpers.cs (9)
302if (CharUnicodeInfo.GetUnicodeCategory(ch) == UnicodeCategory.Surrogate) 304var category = CharUnicodeInfo.GetUnicodeCategory(value, i); 305if (category == UnicodeCategory.Surrogate) 395static bool NeedsEscaping(UnicodeCategory category) 399case UnicodeCategory.Control: 400case UnicodeCategory.OtherNotAssigned: 401case UnicodeCategory.ParagraphSeparator: 402case UnicodeCategory.LineSeparator: 403case UnicodeCategory.Surrogate:
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ResultProvider (27)
src\Compilers\Core\Portable\InternalUtilities\UnicodeCharacterUtilities.cs (17)
80UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 115private static bool IsLetterChar(UnicodeCategory cat) 123case UnicodeCategory.UppercaseLetter: 124case UnicodeCategory.LowercaseLetter: 125case UnicodeCategory.TitlecaseLetter: 126case UnicodeCategory.ModifierLetter: 127case UnicodeCategory.OtherLetter: 128case UnicodeCategory.LetterNumber: 135private static bool IsCombiningChar(UnicodeCategory cat) 143case UnicodeCategory.NonSpacingMark: 144case UnicodeCategory.SpacingCombiningMark: 151private static bool IsDecimalDigitChar(UnicodeCategory cat) 157return cat == UnicodeCategory.DecimalDigitNumber; 160private static bool IsConnectingChar(UnicodeCategory cat) 166return cat == UnicodeCategory.ConnectorPunctuation; 184private static bool IsFormattingChar(UnicodeCategory cat) 190return cat == UnicodeCategory.Format;
src\Compilers\CSharp\Portable\Parser\CharacterInfo.cs (1)
142|| (ch > 255 && CharUnicodeInfo.GetUnicodeCategory(ch) == UnicodeCategory.SpaceSeparator);
src\Compilers\CSharp\Portable\SymbolDisplay\ObjectDisplay.cs (9)
189private static bool NeedsEscaping(UnicodeCategory category) 193case UnicodeCategory.Control: 194case UnicodeCategory.OtherNotAssigned: 195case UnicodeCategory.ParagraphSeparator: 196case UnicodeCategory.LineSeparator: 197case UnicodeCategory.Surrogate: 242if (escapeNonPrintable && CharUnicodeInfo.GetUnicodeCategory(c) == UnicodeCategory.Surrogate) 244var category = CharUnicodeInfo.GetUnicodeCategory(value, i); 245if (category == UnicodeCategory.Surrogate)
Microsoft.CodeAnalysis.CSharp.Features (5)
ConvertToRawString\ConvertToRawStringHelpers.cs (3)
124var category = Rune.GetUnicodeCategory(ch.Rune); 125if (category is UnicodeCategory.Format or UnicodeCategory.Control)
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (2)
183=> Rune.GetUnicodeCategory(rune) is UnicodeCategory.Control or UnicodeCategory.Format
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
LexicalAndXml\LexicalTests.cs (1)
861Assert.Equal(System.Globalization.UnicodeCategory.UppercaseLetter, CharUnicodeInfo.GetUnicodeCategory(text[0]));
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (17)
src\Compilers\Core\Portable\InternalUtilities\UnicodeCharacterUtilities.cs (17)
80UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 115private static bool IsLetterChar(UnicodeCategory cat) 123case UnicodeCategory.UppercaseLetter: 124case UnicodeCategory.LowercaseLetter: 125case UnicodeCategory.TitlecaseLetter: 126case UnicodeCategory.ModifierLetter: 127case UnicodeCategory.OtherLetter: 128case UnicodeCategory.LetterNumber: 135private static bool IsCombiningChar(UnicodeCategory cat) 143case UnicodeCategory.NonSpacingMark: 144case UnicodeCategory.SpacingCombiningMark: 151private static bool IsDecimalDigitChar(UnicodeCategory cat) 157return cat == UnicodeCategory.DecimalDigitNumber; 160private static bool IsConnectingChar(UnicodeCategory cat) 166return cat == UnicodeCategory.ConnectorPunctuation; 184private static bool IsFormattingChar(UnicodeCategory cat) 190return cat == UnicodeCategory.Format;
Microsoft.CodeAnalysis.Features (8)
EmbeddedLanguages\RegularExpressions\RegexCharClass.cs (8)
215case UnicodeCategory.UppercaseLetter: 216case UnicodeCategory.LowercaseLetter: 217case UnicodeCategory.TitlecaseLetter: 218case UnicodeCategory.ModifierLetter: 219case UnicodeCategory.OtherLetter: 220case UnicodeCategory.NonSpacingMark: 221case UnicodeCategory.DecimalDigitNumber: 222case UnicodeCategory.ConnectorPunctuation:
Microsoft.CodeAnalysis.PublicApiAnalyzers (12)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (12)
269UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 280UnicodeCategory.UppercaseLetter 281or UnicodeCategory.LowercaseLetter 282or UnicodeCategory.TitlecaseLetter 283or UnicodeCategory.ModifierLetter 284or UnicodeCategory.OtherLetter 285or UnicodeCategory.LetterNumber 286or UnicodeCategory.DecimalDigitNumber 287or UnicodeCategory.ConnectorPunctuation 288or UnicodeCategory.NonSpacingMark 289or UnicodeCategory.SpacingCombiningMark 290or UnicodeCategory.Format => true,
Microsoft.CodeAnalysis.ResxSourceGenerator (25)
AbstractResxGenerator.cs (13)
735var cat = CharUnicodeInfo.GetUnicodeCategory(ch); 737|| cat == UnicodeCategory.DecimalDigitNumber 738|| cat == UnicodeCategory.ConnectorPunctuation 739|| cat == UnicodeCategory.Format 740|| cat == UnicodeCategory.NonSpacingMark 741|| cat == UnicodeCategory.SpacingCombiningMark; 744static bool IsLetterChar(UnicodeCategory cat) 748case UnicodeCategory.UppercaseLetter: 749case UnicodeCategory.LowercaseLetter: 750case UnicodeCategory.TitlecaseLetter: 751case UnicodeCategory.ModifierLetter: 752case UnicodeCategory.OtherLetter: 753case UnicodeCategory.LetterNumber:
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (12)
269UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 280UnicodeCategory.UppercaseLetter 281or UnicodeCategory.LowercaseLetter 282or UnicodeCategory.TitlecaseLetter 283or UnicodeCategory.ModifierLetter 284or UnicodeCategory.OtherLetter 285or UnicodeCategory.LetterNumber 286or UnicodeCategory.DecimalDigitNumber 287or UnicodeCategory.ConnectorPunctuation 288or UnicodeCategory.NonSpacingMark 289or UnicodeCategory.SpacingCombiningMark 290or UnicodeCategory.Format => true,
Microsoft.CodeAnalysis.VisualBasic (25)
Scanner\CharacterInfo.vb (18)
69Return CharUnicodeInfo.GetUnicodeCategory(ch) = UnicodeCategory.SpaceSeparator 233Dim CharacterProperties As UnicodeCategory = CharUnicodeInfo.GetUnicodeCategory(c) 377Dim CharacterProperties As UnicodeCategory = CharUnicodeInfo.GetUnicodeCategory(c) 448Friend Shared Function IsPropAlpha(CharacterProperties As UnicodeCategory) As Boolean 449Return CharacterProperties <= UnicodeCategory.OtherLetter 452Friend Shared Function IsPropAlphaNumeric(CharacterProperties As UnicodeCategory) As Boolean 453Return CharacterProperties <= UnicodeCategory.DecimalDigitNumber 456Friend Shared Function IsPropLetterDigit(CharacterProperties As UnicodeCategory) As Boolean 457Return CharacterProperties = UnicodeCategory.LetterNumber 460Friend Shared Function IsPropConnectorPunctuation(CharacterProperties As UnicodeCategory) As Boolean 461Return CharacterProperties = UnicodeCategory.ConnectorPunctuation 464Friend Shared Function IsPropCombining(CharacterProperties As UnicodeCategory) As Boolean 465Return CharacterProperties >= UnicodeCategory.NonSpacingMark AndAlso 466CharacterProperties <= UnicodeCategory.EnclosingMark 470Return CharUnicodeInfo.GetUnicodeCategory(c) = UnicodeCategory.ConnectorPunctuation 474Return CharUnicodeInfo.GetUnicodeCategory(c) = UnicodeCategory.SpaceSeparator 477Friend Shared Function IsPropOtherFormat(CharacterProperties As UnicodeCategory) As Boolean 478Return CharacterProperties = UnicodeCategory.Format
SymbolDisplay\ObjectDisplay.vb (7)
398ElseIf CharUnicodeInfo.GetUnicodeCategory(c) = UnicodeCategory.Surrogate AndAlso IsPrintable(CharUnicodeInfo.GetUnicodeCategory(str, i - 1)) Then 493Private Function IsPrintable(category As UnicodeCategory) As Boolean 495Case UnicodeCategory.OtherNotAssigned, 496UnicodeCategory.ParagraphSeparator, 497UnicodeCategory.Control, 498UnicodeCategory.LineSeparator, 499UnicodeCategory.Surrogate
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (6)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.StringPiece.vb (6)
26Private Shared Function IsPrintable(c As UnicodeCategory) As Boolean 27Return c <> UnicodeCategory.OtherNotAssigned AndAlso 28c <> UnicodeCategory.ParagraphSeparator AndAlso 29c <> UnicodeCategory.Control AndAlso 30c <> UnicodeCategory.Surrogate 89If category = UnicodeCategory.Surrogate Then
Microsoft.CodeAnalysis.VisualBasic.ResultProvider (25)
src\Compilers\VisualBasic\Portable\Scanner\CharacterInfo.vb (18)
69Return CharUnicodeInfo.GetUnicodeCategory(ch) = UnicodeCategory.SpaceSeparator 233Dim CharacterProperties As UnicodeCategory = CharUnicodeInfo.GetUnicodeCategory(c) 377Dim CharacterProperties As UnicodeCategory = CharUnicodeInfo.GetUnicodeCategory(c) 448Friend Shared Function IsPropAlpha(CharacterProperties As UnicodeCategory) As Boolean 449Return CharacterProperties <= UnicodeCategory.OtherLetter 452Friend Shared Function IsPropAlphaNumeric(CharacterProperties As UnicodeCategory) As Boolean 453Return CharacterProperties <= UnicodeCategory.DecimalDigitNumber 456Friend Shared Function IsPropLetterDigit(CharacterProperties As UnicodeCategory) As Boolean 457Return CharacterProperties = UnicodeCategory.LetterNumber 460Friend Shared Function IsPropConnectorPunctuation(CharacterProperties As UnicodeCategory) As Boolean 461Return CharacterProperties = UnicodeCategory.ConnectorPunctuation 464Friend Shared Function IsPropCombining(CharacterProperties As UnicodeCategory) As Boolean 465Return CharacterProperties >= UnicodeCategory.NonSpacingMark AndAlso 466CharacterProperties <= UnicodeCategory.EnclosingMark 470Return CharUnicodeInfo.GetUnicodeCategory(c) = UnicodeCategory.ConnectorPunctuation 474Return CharUnicodeInfo.GetUnicodeCategory(c) = UnicodeCategory.SpaceSeparator 477Friend Shared Function IsPropOtherFormat(CharacterProperties As UnicodeCategory) As Boolean 478Return CharacterProperties = UnicodeCategory.Format
src\Compilers\VisualBasic\Portable\SymbolDisplay\ObjectDisplay.vb (7)
398ElseIf CharUnicodeInfo.GetUnicodeCategory(c) = UnicodeCategory.Surrogate AndAlso IsPrintable(CharUnicodeInfo.GetUnicodeCategory(str, i - 1)) Then 493Private Function IsPrintable(category As UnicodeCategory) As Boolean 495Case UnicodeCategory.OtherNotAssigned, 496UnicodeCategory.ParagraphSeparator, 497UnicodeCategory.Control, 498UnicodeCategory.LineSeparator, 499UnicodeCategory.Surrogate
Microsoft.CodeAnalysis.VisualBasic.Workspaces (6)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.StringPiece.vb (6)
26Private Shared Function IsPrintable(c As UnicodeCategory) As Boolean 27Return c <> UnicodeCategory.OtherNotAssigned AndAlso 28c <> UnicodeCategory.ParagraphSeparator AndAlso 29c <> UnicodeCategory.Control AndAlso 30c <> UnicodeCategory.Surrogate 89If category = UnicodeCategory.Surrogate Then
Microsoft.CodeAnalysis.Workspaces (17)
src\Compilers\Core\Portable\InternalUtilities\UnicodeCharacterUtilities.cs (17)
80UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 115private static bool IsLetterChar(UnicodeCategory cat) 123case UnicodeCategory.UppercaseLetter: 124case UnicodeCategory.LowercaseLetter: 125case UnicodeCategory.TitlecaseLetter: 126case UnicodeCategory.ModifierLetter: 127case UnicodeCategory.OtherLetter: 128case UnicodeCategory.LetterNumber: 135private static bool IsCombiningChar(UnicodeCategory cat) 143case UnicodeCategory.NonSpacingMark: 144case UnicodeCategory.SpacingCombiningMark: 151private static bool IsDecimalDigitChar(UnicodeCategory cat) 157return cat == UnicodeCategory.DecimalDigitNumber; 160private static bool IsConnectingChar(UnicodeCategory cat) 166return cat == UnicodeCategory.ConnectorPunctuation; 184private static bool IsFormattingChar(UnicodeCategory cat) 190return cat == UnicodeCategory.Format;
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (17)
src\Compilers\Core\Portable\InternalUtilities\UnicodeCharacterUtilities.cs (17)
80UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 115private static bool IsLetterChar(UnicodeCategory cat) 123case UnicodeCategory.UppercaseLetter: 124case UnicodeCategory.LowercaseLetter: 125case UnicodeCategory.TitlecaseLetter: 126case UnicodeCategory.ModifierLetter: 127case UnicodeCategory.OtherLetter: 128case UnicodeCategory.LetterNumber: 135private static bool IsCombiningChar(UnicodeCategory cat) 143case UnicodeCategory.NonSpacingMark: 144case UnicodeCategory.SpacingCombiningMark: 151private static bool IsDecimalDigitChar(UnicodeCategory cat) 157return cat == UnicodeCategory.DecimalDigitNumber; 160private static bool IsConnectingChar(UnicodeCategory cat) 166return cat == UnicodeCategory.ConnectorPunctuation; 184private static bool IsFormattingChar(UnicodeCategory cat) 190return cat == UnicodeCategory.Format;
Microsoft.DotNet.Arcade.Sdk (13)
src\GenerateResxSource.cs (13)
395var cat = CharUnicodeInfo.GetUnicodeCategory(ch); 397|| cat == UnicodeCategory.DecimalDigitNumber 398|| cat == UnicodeCategory.ConnectorPunctuation 399|| cat == UnicodeCategory.Format 400|| cat == UnicodeCategory.NonSpacingMark 401|| cat == UnicodeCategory.SpacingCombiningMark; 404static bool IsLetterChar(UnicodeCategory cat) 408case UnicodeCategory.UppercaseLetter: 409case UnicodeCategory.LowercaseLetter: 410case UnicodeCategory.TitlecaseLetter: 411case UnicodeCategory.ModifierLetter: 412case UnicodeCategory.OtherLetter: 413case UnicodeCategory.LetterNumber:
Microsoft.Extensions.ApiDescription.Client (6)
CSharpIdentifier.cs (6)
18CharUnicodeInfo.GetUnicodeCategory(character) == UnicodeCategory.LetterNumber; 30var category = CharUnicodeInfo.GetUnicodeCategory(character); 32return category == UnicodeCategory.NonSpacingMark || // Mn 33category == UnicodeCategory.SpacingCombiningMark || // Mc 34category == UnicodeCategory.ConnectorPunctuation || // Pc 35category == UnicodeCategory.Format; // Cf
Microsoft.Extensions.FileProviders.Embedded (6)
EmbeddedFileProvider.cs (6)
195CharUnicodeInfo.GetUnicodeCategory(c) == UnicodeCategory.ConnectorPunctuation; 203var cat = CharUnicodeInfo.GetUnicodeCategory(c); 207cat == UnicodeCategory.ConnectorPunctuation || 208cat == UnicodeCategory.NonSpacingMark || 209cat == UnicodeCategory.SpacingCombiningMark || 210cat == UnicodeCategory.EnclosingMark;
Microsoft.ML.Tokenizers (5)
Normalizer\BertNormalizer.cs (5)
62UnicodeCategory category = CharUnicodeInfo.GetUnicodeCategory(original, i); 64if (category == UnicodeCategory.Control) 70if (category == UnicodeCategory.SpaceSeparator) 77if (_removeNonSpacingMarks && category is UnicodeCategory.NonSpacingMark) 83if (_lowerCase && category == UnicodeCategory.UppercaseLetter)
Microsoft.ML.Transforms (14)
Expression\LexCharUtils.cs (14)
43ConnectorPunctuation = 1 << UnicodeCategory.ConnectorPunctuation, // Pc 44DecimalDigitNumber = 1 << UnicodeCategory.DecimalDigitNumber, // Nd 45Format = 1 << UnicodeCategory.Format, // Cf 46LetterNumber = 1 << UnicodeCategory.LetterNumber, // Nl 47LowercaseLetter = 1 << UnicodeCategory.LowercaseLetter, // Ll 48ModifierLetter = 1 << UnicodeCategory.ModifierLetter, // Lm 49NonSpacingMark = 1 << UnicodeCategory.NonSpacingMark, // Mn 50OtherLetter = 1 << UnicodeCategory.OtherLetter, // Lo 51SpaceSeparator = 1 << UnicodeCategory.SpaceSeparator, // Zs 52SpacingCombiningMark = 1 << UnicodeCategory.SpacingCombiningMark, // Mc 53TitlecaseLetter = 1 << UnicodeCategory.TitlecaseLetter, // Lt 54UppercaseLetter = 1 << UnicodeCategory.UppercaseLetter, // Lu 201return ch >= _rgchi.Length && CharUnicodeInfo.GetUnicodeCategory(ch) == UnicodeCategory.Format; 207return CharUnicodeInfo.GetUnicodeCategory(ch) == UnicodeCategory.SpaceSeparator;
Microsoft.VisualBasic.Core (4)
Microsoft\VisualBasic\CompilerServices\StringType.vb (4)
550(UnicodeCategory.ModifierSymbol = Char.GetUnicodeCategory(Pattern.Chars(PatternIndex + 1)) OrElse _ 551UnicodeCategory.NonSpacingMark = Char.GetUnicodeCategory(Pattern.Chars(PatternIndex + 1))) 556(UnicodeCategory.ModifierSymbol = Char.GetUnicodeCategory(Source.Chars(SourceIndex + 1)) OrElse _ 557UnicodeCategory.NonSpacingMark = Char.GetUnicodeCategory(Source.Chars(SourceIndex + 1)))
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
286[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.UnicodeCategory))]
netstandard (1)
netstandard.cs (1)
857[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.UnicodeCategory))]
PresentationBuildTasks (10)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\RuntimeIdentifierPropertyAttribute.cs (10)
95UnicodeCategory uc; 99bool idStart = (uc == UnicodeCategory.UppercaseLetter || // (Lu) 100uc == UnicodeCategory.LowercaseLetter || // (Ll) 101uc == UnicodeCategory.TitlecaseLetter || // (Lt) 102uc == UnicodeCategory.OtherLetter || // (Lo) 103uc == UnicodeCategory.LetterNumber || // (Nl) 105bool idExtend = (uc == UnicodeCategory.NonSpacingMark || // (Mn) 106uc == UnicodeCategory.SpacingCombiningMark || // (Mc) 107uc == UnicodeCategory.ModifierLetter || // (Lm) 108uc == UnicodeCategory.DecimalDigitNumber); // (Nd)
PresentationFramework (8)
System\Windows\Documents\TextPointerBase.cs (8)
1383UnicodeCategory category1 = Char.GetUnicodeCategory(neighborhood[1]); 1384if (category1 == UnicodeCategory.SpacingCombiningMark || 1385category1 == UnicodeCategory.NonSpacingMark || 1386category1 == UnicodeCategory.EnclosingMark) 1388UnicodeCategory category0 = Char.GetUnicodeCategory(neighborhood[0]); 1390if (category0 != UnicodeCategory.Control && 1391category0 != UnicodeCategory.Format && 1392category0 != UnicodeCategory.OtherNotAssigned)
Roslyn.Diagnostics.Analyzers (12)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (12)
269UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 280UnicodeCategory.UppercaseLetter 281or UnicodeCategory.LowercaseLetter 282or UnicodeCategory.TitlecaseLetter 283or UnicodeCategory.ModifierLetter 284or UnicodeCategory.OtherLetter 285or UnicodeCategory.LetterNumber 286or UnicodeCategory.DecimalDigitNumber 287or UnicodeCategory.ConnectorPunctuation 288or UnicodeCategory.NonSpacingMark 289or UnicodeCategory.SpacingCombiningMark 290or UnicodeCategory.Format => true,
Roslyn.Test.PdbUtilities (4)
Shared\StringUtilities.cs (4)
23case UnicodeCategory.Control: 24case UnicodeCategory.OtherNotAssigned: 25case UnicodeCategory.ParagraphSeparator: 26case UnicodeCategory.Surrogate:
System.CodeDom (11)
src\libraries\Common\src\System\CSharpHelpers.cs (11)
155UnicodeCategory uc = CharUnicodeInfo.GetUnicodeCategory(ch); 158case UnicodeCategory.UppercaseLetter: // Lu 159case UnicodeCategory.LowercaseLetter: // Ll 160case UnicodeCategory.TitlecaseLetter: // Lt 161case UnicodeCategory.ModifierLetter: // Lm 162case UnicodeCategory.LetterNumber: // Lm 163case UnicodeCategory.OtherLetter: // Lo 167case UnicodeCategory.NonSpacingMark: // Mn 168case UnicodeCategory.SpacingCombiningMark: // Mc 169case UnicodeCategory.ConnectorPunctuation: // Pc 170case UnicodeCategory.DecimalDigitNumber: // Nd
System.Globalization (1)
System.Globalization.cs (1)
13[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.UnicodeCategory))]
System.Private.CoreLib (81)
src\libraries\System.Private.CoreLib\src\System\Char.cs (35)
94private static UnicodeCategory GetLatin1UnicodeCategory(char c) 97return (UnicodeCategory)(Latin1CharInfo[c] & UnicodeCategoryMask); 317return CharUnicodeInfo.GetUnicodeCategory(c) == UnicodeCategory.DecimalDigitNumber; 333private static bool IsBetween(UnicodeCategory c, UnicodeCategory min, UnicodeCategory max) => 339internal static bool CheckLetter(UnicodeCategory uc) 341return IsBetween(uc, UnicodeCategory.UppercaseLetter, UnicodeCategory.OtherLetter); 392return CharUnicodeInfo.GetUnicodeCategory(c) == UnicodeCategory.UppercaseLetter; 406return CharUnicodeInfo.GetUnicodeCategory(c) == UnicodeCategory.LowercaseLetter; 409internal static bool CheckPunctuation(UnicodeCategory uc) 411return IsBetween(uc, UnicodeCategory.ConnectorPunctuation, UnicodeCategory.OtherPunctuation); 429internal static bool CheckLetterOrDigit(UnicodeCategory uc) 4321 << (int)UnicodeCategory.UppercaseLetter | 4331 << (int)UnicodeCategory.LowercaseLetter | 4341 << (int)UnicodeCategory.TitlecaseLetter | 4351 << (int)UnicodeCategory.ModifierLetter | 4361 << (int)UnicodeCategory.OtherLetter | 4371 << (int)UnicodeCategory.DecimalDigitNumber; 632return CharUnicodeInfo.GetUnicodeCategoryInternal(s, index) == UnicodeCategory.DecimalDigitNumber; 690return CharUnicodeInfo.GetUnicodeCategoryInternal(s, index) == UnicodeCategory.LowercaseLetter; 697internal static bool CheckNumber(UnicodeCategory uc) 699return IsBetween(uc, UnicodeCategory.DecimalDigitNumber, UnicodeCategory.OtherNumber); 769internal static bool CheckSeparator(UnicodeCategory uc) 771return IsBetween(uc, UnicodeCategory.SpaceSeparator, UnicodeCategory.ParagraphSeparator); 833internal static bool CheckSymbol(UnicodeCategory uc) 835return IsBetween(uc, UnicodeCategory.MathSymbol, UnicodeCategory.OtherSymbol); 879return CharUnicodeInfo.GetUnicodeCategoryInternal(s, index) == UnicodeCategory.UppercaseLetter; 899public static UnicodeCategory GetUnicodeCategory(char c) 908public static UnicodeCategory GetUnicodeCategory(string s, int index)
src\libraries\System.Private.CoreLib\src\System\Globalization\CharUnicodeInfo.cs (7)
330public static UnicodeCategory GetUnicodeCategory(char ch) 335public static UnicodeCategory GetUnicodeCategory(int codePoint) 345public static UnicodeCategory GetUnicodeCategory(string s, int index) 363internal static UnicodeCategory GetUnicodeCategoryInternal(string value, int index) 375internal static UnicodeCategory GetUnicodeCategoryInternal(string str, int index, out int charLength) 388private static UnicodeCategory GetUnicodeCategoryNoBoundsChecks(uint codePoint) 394return (UnicodeCategory)(Unsafe.AddByteOffset(ref MemoryMarshal.GetReference(CategoriesValues), offset) & 0x1F);
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (3)
833UnicodeCategory category = Rune.GetUnicodeCategory(result); 834if (category == UnicodeCategory.PrivateUse || category == UnicodeCategory.OtherNotAssigned)
src\libraries\System.Private.CoreLib\src\System\Globalization\NumberFormatInfo.cs (1)
135CharUnicodeInfo.GetUnicodeCategory(nativeDig[i], 0) != UnicodeCategory.PrivateUse)
src\libraries\System.Private.CoreLib\src\System\Globalization\TextInfo.cs (10)
534UnicodeCategory charType = CharUnicodeInfo.GetUnicodeCategoryInternal(str, i, out int charLen); 556bool hasLowerCase = (charType == UnicodeCategory.LowercaseLetter); 564if (charType == UnicodeCategory.LowercaseLetter) 751private static bool IsWordSeparator(UnicodeCategory category) 756private static bool IsLetterCategory(UnicodeCategory uc) 758return uc == UnicodeCategory.UppercaseLetter 759|| uc == UnicodeCategory.LowercaseLetter 760|| uc == UnicodeCategory.TitlecaseLetter 761|| uc == UnicodeCategory.ModifierLetter 762|| uc == UnicodeCategory.OtherLetter;
src\libraries\System.Private.CoreLib\src\System\Text\Rune.cs (25)
1206public static UnicodeCategory GetUnicodeCategory(Rune value) 1210return (UnicodeCategory)(AsciiCharInfo[value.Value] & UnicodeCategoryMask); 1218private static UnicodeCategory GetUnicodeCategoryNonAscii(Rune value) 1233private static bool IsCategoryLetter(UnicodeCategory category) 1235return UnicodeUtility.IsInRangeInclusive((uint)category, (uint)UnicodeCategory.UppercaseLetter, (uint)UnicodeCategory.OtherLetter); 1239private static bool IsCategoryLetterOrDecimalDigit(UnicodeCategory category) 1241return UnicodeUtility.IsInRangeInclusive((uint)category, (uint)UnicodeCategory.UppercaseLetter, (uint)UnicodeCategory.OtherLetter) 1242|| (category == UnicodeCategory.DecimalDigitNumber); 1246private static bool IsCategoryNumber(UnicodeCategory category) 1248return UnicodeUtility.IsInRangeInclusive((uint)category, (uint)UnicodeCategory.DecimalDigitNumber, (uint)UnicodeCategory.OtherNumber); 1252private static bool IsCategoryPunctuation(UnicodeCategory category) 1254return UnicodeUtility.IsInRangeInclusive((uint)category, (uint)UnicodeCategory.ConnectorPunctuation, (uint)UnicodeCategory.OtherPunctuation); 1258private static bool IsCategorySeparator(UnicodeCategory category) 1260return UnicodeUtility.IsInRangeInclusive((uint)category, (uint)UnicodeCategory.SpaceSeparator, (uint)UnicodeCategory.ParagraphSeparator); 1264private static bool IsCategorySymbol(UnicodeCategory category) 1266return UnicodeUtility.IsInRangeInclusive((uint)category, (uint)UnicodeCategory.MathSymbol, (uint)UnicodeCategory.OtherSymbol); 1291return GetUnicodeCategoryNonAscii(value) == UnicodeCategory.DecimalDigitNumber; 1327return GetUnicodeCategoryNonAscii(value) == UnicodeCategory.LowercaseLetter; 1366return GetUnicodeCategoryNonAscii(value) == UnicodeCategory.UppercaseLetter;
System.Private.Xml (43)
src\libraries\Common\src\System\CSharpHelpers.cs (11)
155UnicodeCategory uc = CharUnicodeInfo.GetUnicodeCategory(ch); 158case UnicodeCategory.UppercaseLetter: // Lu 159case UnicodeCategory.LowercaseLetter: // Ll 160case UnicodeCategory.TitlecaseLetter: // Lt 161case UnicodeCategory.ModifierLetter: // Lm 162case UnicodeCategory.LetterNumber: // Lm 163case UnicodeCategory.OtherLetter: // Lo 167case UnicodeCategory.NonSpacingMark: // Mn 168case UnicodeCategory.SpacingCombiningMark: // Mc 169case UnicodeCategory.ConnectorPunctuation: // Pc 170case UnicodeCategory.DecimalDigitNumber: // Nd
System\Xml\Serialization\CodeIdentifier.cs (32)
115if (CharUnicodeInfo.GetUnicodeCategory(c) == UnicodeCategory.DecimalDigitNumber) 122UnicodeCategory uc = CharUnicodeInfo.GetUnicodeCategory(c); 127case UnicodeCategory.UppercaseLetter: // Lu 128case UnicodeCategory.LowercaseLetter: // Ll 129case UnicodeCategory.TitlecaseLetter: // Lt 130case UnicodeCategory.ModifierLetter: // Lm 131case UnicodeCategory.OtherLetter: // Lo 132case UnicodeCategory.DecimalDigitNumber: // Nd 133case UnicodeCategory.NonSpacingMark: // Mn 134case UnicodeCategory.SpacingCombiningMark: // Mc 135case UnicodeCategory.ConnectorPunctuation: // Pc 137case UnicodeCategory.LetterNumber: 138case UnicodeCategory.OtherNumber: 139case UnicodeCategory.EnclosingMark: 140case UnicodeCategory.SpaceSeparator: 141case UnicodeCategory.LineSeparator: 142case UnicodeCategory.ParagraphSeparator: 143case UnicodeCategory.Control: 144case UnicodeCategory.Format: 145case UnicodeCategory.Surrogate: 146case UnicodeCategory.PrivateUse: 147case UnicodeCategory.DashPunctuation: 148case UnicodeCategory.OpenPunctuation: 149case UnicodeCategory.ClosePunctuation: 150case UnicodeCategory.InitialQuotePunctuation: 151case UnicodeCategory.FinalQuotePunctuation: 152case UnicodeCategory.OtherPunctuation: 153case UnicodeCategory.MathSymbol: 154case UnicodeCategory.CurrencySymbol: 155case UnicodeCategory.ModifierSymbol: 156case UnicodeCategory.OtherSymbol: 157case UnicodeCategory.OtherNotAssigned:
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
258[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.UnicodeCategory))]
System.Runtime.Serialization.Schema (11)
System\Runtime\Serialization\Schema\CodeExporter.cs (11)
1637return (char.GetUnicodeCategory(c) != UnicodeCategory.DecimalDigitNumber); 1642UnicodeCategory uc = char.GetUnicodeCategory(c); 1648case UnicodeCategory.UppercaseLetter: // Lu 1649case UnicodeCategory.LowercaseLetter: // Ll 1650case UnicodeCategory.TitlecaseLetter: // Lt 1651case UnicodeCategory.ModifierLetter: // Lm 1652case UnicodeCategory.OtherLetter: // Lo 1653case UnicodeCategory.DecimalDigitNumber: // Nd 1654case UnicodeCategory.NonSpacingMark: // Mn 1655case UnicodeCategory.SpacingCombiningMark: // Mc 1656case UnicodeCategory.ConnectorPunctuation: // Pc
System.Text.Json (6)
src\libraries\System.Text.Json\Common\JsonSeparatorNamingPolicy.cs (6)
51UnicodeCategory category = char.GetUnicodeCategory(current); 55case UnicodeCategory.UppercaseLetter: 95case UnicodeCategory.LowercaseLetter: 96case UnicodeCategory.DecimalDigitNumber: 104if (!lowercase && category is UnicodeCategory.LowercaseLetter) 113case UnicodeCategory.SpaceSeparator:
System.Text.Json.SourceGeneration (6)
src\libraries\System.Text.Json\Common\JsonSeparatorNamingPolicy.cs (6)
51UnicodeCategory category = char.GetUnicodeCategory(current); 55case UnicodeCategory.UppercaseLetter: 95case UnicodeCategory.LowercaseLetter: 96case UnicodeCategory.DecimalDigitNumber: 104if (!lowercase && category is UnicodeCategory.LowercaseLetter) 113case UnicodeCategory.SpaceSeparator:
System.Text.RegularExpressions (80)
System\Text\RegularExpressions\RegexCharClass.cs (34)
646public static bool TryGetOnlyCategories(string set, Span<UnicodeCategory> categories, out int numCategories, out bool negated) 678categories[numCategories++] = (UnicodeCategory)(c - 1); 694categories[numCategories++] = (UnicodeCategory)(-1 - c); 717categories[numCategories++] = (UnicodeCategory)(c - 1); 738categories[numCategories++] = (UnicodeCategory)(-1 - c); 1002case UnicodeCategory.ClosePunctuation: 1003case UnicodeCategory.ConnectorPunctuation: 1004case UnicodeCategory.Control: 1005case UnicodeCategory.DashPunctuation: 1006case UnicodeCategory.DecimalDigitNumber: 1007case UnicodeCategory.FinalQuotePunctuation: 1008case UnicodeCategory.InitialQuotePunctuation: 1009case UnicodeCategory.LineSeparator: 1010case UnicodeCategory.OpenPunctuation: 1011case UnicodeCategory.OtherNumber: 1012case UnicodeCategory.OtherPunctuation: 1013case UnicodeCategory.ParagraphSeparator: 1014case UnicodeCategory.SpaceSeparator: 12051 << (int)UnicodeCategory.UppercaseLetter | 12061 << (int)UnicodeCategory.LowercaseLetter | 12071 << (int)UnicodeCategory.TitlecaseLetter | 12081 << (int)UnicodeCategory.ModifierLetter | 12091 << (int)UnicodeCategory.OtherLetter | 12101 << (int)UnicodeCategory.NonSpacingMark | 12111 << (int)UnicodeCategory.DecimalDigitNumber | 12121 << (int)UnicodeCategory.ConnectorPunctuation; 1393UnicodeCategory chcategory = char.GetUnicodeCategory(ch); 1418else if (chcategory == (UnicodeCategory)(curcat - 1)) 1433else if (chcategory != (UnicodeCategory)(-1 - curcat)) 1447private static bool CharInCategoryGroup(UnicodeCategory chcategory, ReadOnlySpan<char> category, ref int i) 1459result |= chcategory == (UnicodeCategory)(curcat - 1); 1471result &= chcategory != (UnicodeCategory)(-1 - curcat); 2050(short)(UnicodeCategory.DecimalDigitNumber + 1) => @"\d", 2051-(short)(UnicodeCategory.DecimalDigitNumber + 1) => @"\D",
System\Text\RegularExpressions\RegexCompiler.cs (2)
5640Span<UnicodeCategory> categories = stackalloc UnicodeCategory[1]; // handle the case of one and only one category
System\Text\RegularExpressions\Symbolic\CharSetSolver.cs (1)
136BDD d = UnicodeCategoryConditions.GetCategory(UnicodeCategory.DecimalDigitNumber);
System\Text\RegularExpressions\Symbolic\RegexNodeConverter.cs (23)
377const int UnicodeCategoryCount = 1 + (int)UnicodeCategory.OtherNotAssigned; 378Debug.Assert(!Enum.IsDefined((UnicodeCategory)UnicodeCategoryCount)); 400BDD cond = MapCategoryCodeToCondition((UnicodeCategory)(Math.Abs(categoryCode) - 1)); 484if (catCodes[(int)UnicodeCategory.UppercaseLetter] && 485catCodes[(int)UnicodeCategory.LowercaseLetter] && 486catCodes[(int)UnicodeCategory.TitlecaseLetter] && 487catCodes[(int)UnicodeCategory.ModifierLetter] && 488catCodes[(int)UnicodeCategory.OtherLetter] && 489catCodes[(int)UnicodeCategory.NonSpacingMark] && 490catCodes[(int)UnicodeCategory.DecimalDigitNumber] && 491catCodes[(int)UnicodeCategory.ConnectorPunctuation]) 493catCodes[(int)UnicodeCategory.UppercaseLetter] = 494catCodes[(int)UnicodeCategory.LowercaseLetter] = 495catCodes[(int)UnicodeCategory.TitlecaseLetter] = 496catCodes[(int)UnicodeCategory.ModifierLetter] = 497catCodes[(int)UnicodeCategory.OtherLetter] = 498catCodes[(int)UnicodeCategory.NonSpacingMark] = 499catCodes[(int)UnicodeCategory.DecimalDigitNumber] = 500catCodes[(int)UnicodeCategory.ConnectorPunctuation] = false; 511BDD cond = MapCategoryCodeToCondition((UnicodeCategory)i); 521BDD MapCategoryCodeToCondition(UnicodeCategory code) 523Debug.Assert(Enum.IsDefined(code) || code == (UnicodeCategory)(RegexCharClass.SpaceConst - 1), $"Unknown category: {code}"); 524return code == (UnicodeCategory)(RegexCharClass.SpaceConst - 1) ?
System\Text\RegularExpressions\Symbolic\UnicodeCategoryConditions.cs (12)
13/// <summary>The number of values in <see cref="UnicodeCategory"/>.</summary> 30Debug.Assert(Enum.GetValues<UnicodeCategory>().Length == UnicodeCategoryValueCount); 34/// <summary>Gets a <see cref="BDD"/> that represents the specified <see cref="UnicodeCategory"/>.</summary> 35public static BDD GetCategory(UnicodeCategory category) => 53GetCategory(UnicodeCategory.UppercaseLetter), 54GetCategory(UnicodeCategory.LowercaseLetter), 55GetCategory(UnicodeCategory.TitlecaseLetter), 56GetCategory(UnicodeCategory.ModifierLetter), 57GetCategory(UnicodeCategory.OtherLetter), 58GetCategory(UnicodeCategory.NonSpacingMark), 59GetCategory(UnicodeCategory.DecimalDigitNumber), 60GetCategory(UnicodeCategory.ConnectorPunctuation),
System\Text\RegularExpressions\Symbolic\UnicodeCategoryRanges.cs (1)
17public static ReadOnlySpan<byte> GetSerializedCategory(UnicodeCategory category) =>
System\Text\RegularExpressions\Symbolic\UnicodeCategoryRangesGenerator.cs (7)
41var catMap = new Dictionary<UnicodeCategory, Ranges>(); 42foreach (UnicodeCategory c in Enum.GetValues<UnicodeCategory>()) 70catBDDs[c] = charSetSolver.CreateBDDFromRanges(catMap[(UnicodeCategory)c].ranges); 80sw.WriteLine($" {i} => SerializedCategory{i}_{(UnicodeCategory)i},"); 88sw.WriteLine($" /// <summary>Serialized BDD representation of the set of all characters in UnicodeCategory.{(UnicodeCategory)i}.</summary>"); 89sw.Write($" private static ReadOnlySpan<byte> SerializedCategory{i}_{(UnicodeCategory)i} => ");
System.Text.RegularExpressions.Generator (50)
RegexGenerator.Emitter.cs (16)
557Span<UnicodeCategory> categories = stackalloc UnicodeCategory[5]; // arbitrary limit to keep names from being too unwieldy 1068(UnicodeCategory.UppercaseLetter or 1069UnicodeCategory.LowercaseLetter or 1070UnicodeCategory.TitlecaseLetter or 1071UnicodeCategory.ModifierLetter or 1072UnicodeCategory.LetterNumber or 1073UnicodeCategory.OtherLetter or 1074UnicodeCategory.DecimalDigitNumber or 1075UnicodeCategory.ConnectorPunctuation or 1076UnicodeCategory.SpacingCombiningMark or 1077UnicodeCategory.NonSpacingMark or 1078UnicodeCategory.Format)) 5123Span<UnicodeCategory> categories = stackalloc UnicodeCategory[30]; // number of UnicodeCategory values (though it's unheard of to have a set with all of them) 5127foreach (UnicodeCategory category in categories.Slice(0, numCategories))
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (34)
646public static bool TryGetOnlyCategories(string set, Span<UnicodeCategory> categories, out int numCategories, out bool negated) 678categories[numCategories++] = (UnicodeCategory)(c - 1); 694categories[numCategories++] = (UnicodeCategory)(-1 - c); 717categories[numCategories++] = (UnicodeCategory)(c - 1); 738categories[numCategories++] = (UnicodeCategory)(-1 - c); 1002case UnicodeCategory.ClosePunctuation: 1003case UnicodeCategory.ConnectorPunctuation: 1004case UnicodeCategory.Control: 1005case UnicodeCategory.DashPunctuation: 1006case UnicodeCategory.DecimalDigitNumber: 1007case UnicodeCategory.FinalQuotePunctuation: 1008case UnicodeCategory.InitialQuotePunctuation: 1009case UnicodeCategory.LineSeparator: 1010case UnicodeCategory.OpenPunctuation: 1011case UnicodeCategory.OtherNumber: 1012case UnicodeCategory.OtherPunctuation: 1013case UnicodeCategory.ParagraphSeparator: 1014case UnicodeCategory.SpaceSeparator: 12051 << (int)UnicodeCategory.UppercaseLetter | 12061 << (int)UnicodeCategory.LowercaseLetter | 12071 << (int)UnicodeCategory.TitlecaseLetter | 12081 << (int)UnicodeCategory.ModifierLetter | 12091 << (int)UnicodeCategory.OtherLetter | 12101 << (int)UnicodeCategory.NonSpacingMark | 12111 << (int)UnicodeCategory.DecimalDigitNumber | 12121 << (int)UnicodeCategory.ConnectorPunctuation; 1393UnicodeCategory chcategory = char.GetUnicodeCategory(ch); 1418else if (chcategory == (UnicodeCategory)(curcat - 1)) 1433else if (chcategory != (UnicodeCategory)(-1 - curcat)) 1447private static bool CharInCategoryGroup(UnicodeCategory chcategory, ReadOnlySpan<char> category, ref int i) 1459result |= chcategory == (UnicodeCategory)(curcat - 1); 1471result &= chcategory != (UnicodeCategory)(-1 - curcat); 2050(short)(UnicodeCategory.DecimalDigitNumber + 1) => @"\d", 2051-(short)(UnicodeCategory.DecimalDigitNumber + 1) => @"\D",
System.Windows.Forms (8)
System\Windows\Forms\Controls\UpDown\DomainUpDown.cs (8)
336UnicodeCategory uc = char.GetUnicodeCategory(character[0]); 338if (uc is UnicodeCategory.LetterNumber 339or UnicodeCategory.LowercaseLetter 340or UnicodeCategory.DecimalDigitNumber 341or UnicodeCategory.MathSymbol 342or UnicodeCategory.OtherLetter 343or UnicodeCategory.OtherNumber 344or UnicodeCategory.UppercaseLetter)
System.Windows.Forms.Design (6)
System\ComponentModel\Design\ByteViewer.cs (6)
172UnicodeCategory uc = char.GetUnicodeCategory(c); 173return uc is not UnicodeCategory.Control 174or UnicodeCategory.Format 175or UnicodeCategory.LineSeparator 176or UnicodeCategory.ParagraphSeparator 177or UnicodeCategory.OtherNotAssigned;
System.Windows.Forms.Primitives (1)
System\Windows\Forms\Internals\ClientUtils.cs (1)
37CharUnicodeInfo.GetUnicodeCategory(character) == UnicodeCategory.NonSpacingMark;
System.Xaml (13)
System\Xaml\NameValidationHelper.cs (10)
31UnicodeCategory uc; 35bool idStart = (uc == UnicodeCategory.UppercaseLetter || // (Lu) 36uc == UnicodeCategory.LowercaseLetter || // (Ll) 37uc == UnicodeCategory.TitlecaseLetter || // (Lt) 38uc == UnicodeCategory.OtherLetter || // (Lo) 39uc == UnicodeCategory.LetterNumber || // (Nl) 41bool idExtend = (uc == UnicodeCategory.NonSpacingMark || // (Mn) 42uc == UnicodeCategory.SpacingCombiningMark || // (Mc) 43uc == UnicodeCategory.ModifierLetter || // (Lm) 44uc == UnicodeCategory.DecimalDigitNumber); // (Nd)
System\Xaml\Parser\XamlName.cs (3)
79var unicodeCategory = char.GetUnicodeCategory(ch); 80if (unicodeCategory == UnicodeCategory.NonSpacingMark || unicodeCategory == UnicodeCategory.SpacingCombiningMark)
Test.Utilities (12)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (12)
269UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 280UnicodeCategory.UppercaseLetter 281or UnicodeCategory.LowercaseLetter 282or UnicodeCategory.TitlecaseLetter 283or UnicodeCategory.ModifierLetter 284or UnicodeCategory.OtherLetter 285or UnicodeCategory.LetterNumber 286or UnicodeCategory.DecimalDigitNumber 287or UnicodeCategory.ConnectorPunctuation 288or UnicodeCategory.NonSpacingMark 289or UnicodeCategory.SpacingCombiningMark 290or UnicodeCategory.Format => true,
Text.Analyzers (12)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (12)
269UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 280UnicodeCategory.UppercaseLetter 281or UnicodeCategory.LowercaseLetter 282or UnicodeCategory.TitlecaseLetter 283or UnicodeCategory.ModifierLetter 284or UnicodeCategory.OtherLetter 285or UnicodeCategory.LetterNumber 286or UnicodeCategory.DecimalDigitNumber 287or UnicodeCategory.ConnectorPunctuation 288or UnicodeCategory.NonSpacingMark 289or UnicodeCategory.SpacingCombiningMark 290or UnicodeCategory.Format => true,