903 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
GenerateDocumentationAndConfigFiles (29)
src\roslyn\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\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (12)
271UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 282UnicodeCategory.UppercaseLetter 283or UnicodeCategory.LowercaseLetter 284or UnicodeCategory.TitlecaseLetter 285or UnicodeCategory.ModifierLetter 286or UnicodeCategory.OtherLetter 287or UnicodeCategory.LetterNumber 288or UnicodeCategory.DecimalDigitNumber 289or UnicodeCategory.ConnectorPunctuation 290or UnicodeCategory.NonSpacingMark 291or UnicodeCategory.SpacingCombiningMark 292or UnicodeCategory.Format => true,
Microsoft.Build (8)
_generated\10\RegexGenerator.g.cs (8)
71231 << (int)UnicodeCategory.UppercaseLetter | 71241 << (int)UnicodeCategory.LowercaseLetter | 71251 << (int)UnicodeCategory.TitlecaseLetter | 71261 << (int)UnicodeCategory.ModifierLetter | 71271 << (int)UnicodeCategory.OtherLetter | 71281 << (int)UnicodeCategory.NonSpacingMark | 71291 << (int)UnicodeCategory.DecimalDigitNumber | 71301 << (int)UnicodeCategory.ConnectorPunctuation;
Microsoft.Build.Tasks.CodeAnalysis (17)
src\roslyn\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)
291CharUnicodeInfo.GetUnicodeCategory(c) == UnicodeCategory.ConnectorPunctuation; 299UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(c); 303cat == UnicodeCategory.ConnectorPunctuation || 304cat == UnicodeCategory.NonSpacingMark || 305cat == UnicodeCategory.SpacingCombiningMark || 306cat == UnicodeCategory.EnclosingMark;
src\msbuild\src\Shared\LanguageParser\tokenChar.cs (16)
36UnicodeCategory cat = System.Globalization.CharUnicodeInfo.GetUnicodeCategory(c); 41cat == UnicodeCategory.UppercaseLetter 42|| cat == UnicodeCategory.LowercaseLetter 43|| cat == UnicodeCategory.TitlecaseLetter 44|| cat == UnicodeCategory.ModifierLetter 45|| cat == UnicodeCategory.OtherLetter 46|| cat == UnicodeCategory.LetterNumber) 60UnicodeCategory cat = System.Globalization.CharUnicodeInfo.GetUnicodeCategory(c); 65cat == UnicodeCategory.DecimalDigitNumber) 79UnicodeCategory cat = System.Globalization.CharUnicodeInfo.GetUnicodeCategory(c); 85cat == UnicodeCategory.ConnectorPunctuation) 99UnicodeCategory cat = System.Globalization.CharUnicodeInfo.GetUnicodeCategory(c); 104cat == UnicodeCategory.NonSpacingMark // Mn 105|| cat == UnicodeCategory.SpacingCombiningMark) // Mc 119UnicodeCategory cat = System.Globalization.CharUnicodeInfo.GetUnicodeCategory(c); 124cat == UnicodeCategory.Format) // Cf
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 (29)
src\roslyn\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\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (12)
271UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 282UnicodeCategory.UppercaseLetter 283or UnicodeCategory.LowercaseLetter 284or UnicodeCategory.TitlecaseLetter 285or UnicodeCategory.ModifierLetter 286or UnicodeCategory.OtherLetter 287or UnicodeCategory.LetterNumber 288or UnicodeCategory.DecimalDigitNumber 289or UnicodeCategory.ConnectorPunctuation 290or UnicodeCategory.NonSpacingMark 291or UnicodeCategory.SpacingCombiningMark 292or UnicodeCategory.Format => true,
Microsoft.CodeAnalysis.AnalyzerUtilities (29)
src\roslyn\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\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (12)
271UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 282UnicodeCategory.UppercaseLetter 283or UnicodeCategory.LowercaseLetter 284or UnicodeCategory.TitlecaseLetter 285or UnicodeCategory.ModifierLetter 286or UnicodeCategory.OtherLetter 287or UnicodeCategory.LetterNumber 288or UnicodeCategory.DecimalDigitNumber 289or UnicodeCategory.ConnectorPunctuation 290or UnicodeCategory.NonSpacingMark 291or UnicodeCategory.SpacingCombiningMark 292or UnicodeCategory.Format => true,
Microsoft.CodeAnalysis.CodeStyle (17)
src\roslyn\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)
188private static bool NeedsEscaping(UnicodeCategory category) 192case UnicodeCategory.Control: 193case UnicodeCategory.OtherNotAssigned: 194case UnicodeCategory.ParagraphSeparator: 195case UnicodeCategory.LineSeparator: 196case UnicodeCategory.Surrogate: 241if (escapeNonPrintable && CharUnicodeInfo.GetUnicodeCategory(c) == UnicodeCategory.Surrogate) 243var category = CharUnicodeInfo.GetUnicodeCategory(value, i); 244if (category == UnicodeCategory.Surrogate)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (2)
182=> Rune.GetUnicodeCategory(rune) is UnicodeCategory.Control or UnicodeCategory.Format
Microsoft.CodeAnalysis.CSharp.Features (36)
ConvertToRawString\ConvertToRawStringHelpers.cs (3)
134private static bool IsFormatOrControl(UnicodeCategory category) 135=> category is UnicodeCategory.Format or UnicodeCategory.Control;
LanguageServices\CSharpSymbolDisplayService.SymbolDescriptionBuilder.cs (31)
227var category = char.GetUnicodeCategory(c); 230UnicodeCategory.UppercaseLetter => true, 231UnicodeCategory.LowercaseLetter => true, 232UnicodeCategory.TitlecaseLetter => true, 233UnicodeCategory.ModifierLetter => true, 234UnicodeCategory.OtherLetter => true, 235UnicodeCategory.NonSpacingMark => false, // does not render well when surrounded by single quotes 236UnicodeCategory.SpacingCombiningMark => true, // adds space, so still legible 237UnicodeCategory.EnclosingMark => false, // not generally displayable 238UnicodeCategory.DecimalDigitNumber => true, 239UnicodeCategory.LetterNumber => true, 240UnicodeCategory.OtherNumber => true, 241UnicodeCategory.SpaceSeparator => true, 242UnicodeCategory.LineSeparator => false, // renders as newline, looks awkward 243UnicodeCategory.ParagraphSeparator => false, // renders as newline, looks awkward 244UnicodeCategory.Control => false, // no glyph 245UnicodeCategory.Format => false, // no glyph 246UnicodeCategory.Surrogate => false, // no glyph 247UnicodeCategory.PrivateUse => false, // no glyph 248UnicodeCategory.ConnectorPunctuation => true, 249UnicodeCategory.DashPunctuation => true, 250UnicodeCategory.OpenPunctuation => true, 251UnicodeCategory.ClosePunctuation => true, 252UnicodeCategory.InitialQuotePunctuation => true, 253UnicodeCategory.FinalQuotePunctuation => true, 254UnicodeCategory.OtherPunctuation => true, 255UnicodeCategory.MathSymbol => true, 256UnicodeCategory.CurrencySymbol => true, 257UnicodeCategory.ModifierSymbol => true, 258UnicodeCategory.OtherSymbol => true, 259UnicodeCategory.OtherNotAssigned => false,
src\roslyn\src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (2)
182=> Rune.GetUnicodeCategory(rune) is UnicodeCategory.Control or UnicodeCategory.Format
Microsoft.CodeAnalysis.Features (8)
EmbeddedLanguages\RegularExpressions\RegexCharClass.cs (8)
210case UnicodeCategory.UppercaseLetter: 211case UnicodeCategory.LowercaseLetter: 212case UnicodeCategory.TitlecaseLetter: 213case UnicodeCategory.ModifierLetter: 214case UnicodeCategory.OtherLetter: 215case UnicodeCategory.NonSpacingMark: 216case UnicodeCategory.DecimalDigitNumber: 217case UnicodeCategory.ConnectorPunctuation:
Microsoft.CodeAnalysis.NetAnalyzers (12)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\WellKnownTypeProvider.cs (12)
325UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 336UnicodeCategory.UppercaseLetter 337or UnicodeCategory.LowercaseLetter 338or UnicodeCategory.TitlecaseLetter 339or UnicodeCategory.ModifierLetter 340or UnicodeCategory.OtherLetter 341or UnicodeCategory.LetterNumber 342or UnicodeCategory.DecimalDigitNumber 343or UnicodeCategory.ConnectorPunctuation 344or UnicodeCategory.NonSpacingMark 345or UnicodeCategory.SpacingCombiningMark 346or UnicodeCategory.Format => true,
Microsoft.CodeAnalysis.Razor.Compiler (4)
Language\DefaultRazorIntermediateNodeLoweringPhase.cs (4)
185var category = char.GetUnicodeCategory(startTagName, 0); 187return category is System.Globalization.UnicodeCategory.UppercaseLetter || 189(category is System.Globalization.UnicodeCategory.TitlecaseLetter or System.Globalization.UnicodeCategory.OtherLetter));
Microsoft.CodeAnalysis.ResxSourceGenerator (42)
AbstractResxGenerator.cs (13)
766var cat = CharUnicodeInfo.GetUnicodeCategory(ch); 768|| cat == UnicodeCategory.DecimalDigitNumber 769|| cat == UnicodeCategory.ConnectorPunctuation 770|| cat == UnicodeCategory.Format 771|| cat == UnicodeCategory.NonSpacingMark 772|| cat == UnicodeCategory.SpacingCombiningMark; 775static bool IsLetterChar(UnicodeCategory cat) 779case UnicodeCategory.UppercaseLetter: 780case UnicodeCategory.LowercaseLetter: 781case UnicodeCategory.TitlecaseLetter: 782case UnicodeCategory.ModifierLetter: 783case UnicodeCategory.OtherLetter: 784case UnicodeCategory.LetterNumber:
src\roslyn\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\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (12)
271UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 282UnicodeCategory.UppercaseLetter 283or UnicodeCategory.LowercaseLetter 284or UnicodeCategory.TitlecaseLetter 285or UnicodeCategory.ModifierLetter 286or UnicodeCategory.OtherLetter 287or UnicodeCategory.LetterNumber 288or UnicodeCategory.DecimalDigitNumber 289or UnicodeCategory.ConnectorPunctuation 290or UnicodeCategory.NonSpacingMark 291or UnicodeCategory.SpacingCombiningMark 292or 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\roslyn\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.Workspaces (6)
src\roslyn\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\roslyn\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.FileProviders.Embedded (6)
EmbeddedFileProvider.cs (6)
202CharUnicodeInfo.GetUnicodeCategory(c) == UnicodeCategory.ConnectorPunctuation; 210var cat = CharUnicodeInfo.GetUnicodeCategory(c); 214cat == UnicodeCategory.ConnectorPunctuation || 215cat == UnicodeCategory.NonSpacingMark || 216cat == UnicodeCategory.SpacingCombiningMark || 217cat == UnicodeCategory.EnclosingMark;
Microsoft.ML.Tokenizers (14)
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)
Normalizer\SentencePieceNormalizationStep.cs (1)
290if (CharUnicodeInfo.GetUnicodeCategory(decomposed, i) == UnicodeCategory.NonSpacingMark)
RegexGenerator.g.cs (8)
23121 << (int)UnicodeCategory.UppercaseLetter | 23131 << (int)UnicodeCategory.LowercaseLetter | 23141 << (int)UnicodeCategory.TitlecaseLetter | 23151 << (int)UnicodeCategory.ModifierLetter | 23161 << (int)UnicodeCategory.OtherLetter | 23171 << (int)UnicodeCategory.NonSpacingMark | 23181 << (int)UnicodeCategory.DecimalDigitNumber | 23191 << (int)UnicodeCategory.ConnectorPunctuation;
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.NET.Build.Containers (8)
_generated\0\RegexGenerator.g.cs (8)
2711 << (int)UnicodeCategory.UppercaseLetter | 2721 << (int)UnicodeCategory.LowercaseLetter | 2731 << (int)UnicodeCategory.TitlecaseLetter | 2741 << (int)UnicodeCategory.ModifierLetter | 2751 << (int)UnicodeCategory.OtherLetter | 2761 << (int)UnicodeCategory.NonSpacingMark | 2771 << (int)UnicodeCategory.DecimalDigitNumber | 2781 << (int)UnicodeCategory.ConnectorPunctuation;
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (17)
UnicodeCharacterUtilities.cs (17)
78UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 124private static bool IsLetterChar(UnicodeCategory cat) 132UnicodeCategory.UppercaseLetter or UnicodeCategory.LowercaseLetter or UnicodeCategory.TitlecaseLetter or UnicodeCategory.ModifierLetter or UnicodeCategory.OtherLetter or UnicodeCategory.LetterNumber => true, 137private static bool IsCombiningChar(UnicodeCategory cat) 145UnicodeCategory.NonSpacingMark or UnicodeCategory.SpacingCombiningMark => true, 150private static bool IsDecimalDigitChar(UnicodeCategory cat) 156return cat == UnicodeCategory.DecimalDigitNumber; 159private static bool IsConnectingChar(UnicodeCategory cat) 165return cat == UnicodeCategory.ConnectorPunctuation; 172private static bool IsFormattingChar(UnicodeCategory cat) 178return cat == UnicodeCategory.Format;
Microsoft.TestPlatform.AdapterUtilities (6)
ManagedNameUtilities\ManagedNameHelper.Reflection.cs (6)
609var category = CharUnicodeInfo.GetUnicodeCategory(c); 611is not UnicodeCategory.LetterNumber // Nl 612and not UnicodeCategory.NonSpacingMark // Mn 613and not UnicodeCategory.SpacingCombiningMark // Mc 614and not UnicodeCategory.ConnectorPunctuation // Pc 615and not UnicodeCategory.Format; // Cf
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\runtime\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))]
NuGet.Common (8)
Tokenizer\Tokenizer.cs (8)
63var c = CharUnicodeInfo.GetUnicodeCategory(ch); 64return c == UnicodeCategory.LowercaseLetter || 65c == UnicodeCategory.UppercaseLetter || 66c == UnicodeCategory.TitlecaseLetter || 67c == UnicodeCategory.OtherLetter || 68c == UnicodeCategory.ModifierLetter || 69c == UnicodeCategory.DecimalDigitNumber || 70c == UnicodeCategory.ConnectorPunctuation;
PresentationBuildTasks (10)
src\wpf\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 (29)
src\roslyn\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\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (12)
271UnicodeCategory cat = CharUnicodeInfo.GetUnicodeCategory(ch); 282UnicodeCategory.UppercaseLetter 283or UnicodeCategory.LowercaseLetter 284or UnicodeCategory.TitlecaseLetter 285or UnicodeCategory.ModifierLetter 286or UnicodeCategory.OtherLetter 287or UnicodeCategory.LetterNumber 288or UnicodeCategory.DecimalDigitNumber 289or UnicodeCategory.ConnectorPunctuation 290or UnicodeCategory.NonSpacingMark 291or UnicodeCategory.SpacingCombiningMark 292or UnicodeCategory.Format => true,
Roslyn.Diagnostics.VisualBasic.Analyzers (6)
src\roslyn\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
System.CodeDom (11)
src\runtime\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.Data.Common (1)
_generated\0\RegexGenerator.g.cs (1)
195while ((uint)iteration < (uint)slice.Length && (char.GetUnicodeCategory(slice[iteration]) != UnicodeCategory.Control))
System.Data.Odbc (1)
_generated\1\RegexGenerator.g.cs (1)
195while ((uint)iteration < (uint)slice.Length && (char.GetUnicodeCategory(slice[iteration]) != UnicodeCategory.Control))
System.Data.OleDb (1)
_generated\4\RegexGenerator.g.cs (1)
195while ((uint)iteration < (uint)slice.Length && (char.GetUnicodeCategory(slice[iteration]) != UnicodeCategory.Control))
System.Diagnostics.EventLog (12)
System\Diagnostics\EventLog.cs (6)
952UnicodeCategory uc = char.GetUnicodeCategory(c); 953return (!(uc == UnicodeCategory.Control) || (uc == UnicodeCategory.Format) || 954(uc == UnicodeCategory.LineSeparator) || (uc == UnicodeCategory.ParagraphSeparator) || 955(uc == UnicodeCategory.OtherNotAssigned));
System\Diagnostics\EventLogInternal.cs (6)
1228UnicodeCategory uc = char.GetUnicodeCategory(c); 1229return (!(uc == UnicodeCategory.Control) || (uc == UnicodeCategory.Format) || 1230(uc == UnicodeCategory.LineSeparator) || (uc == UnicodeCategory.ParagraphSeparator) || 1231(uc == UnicodeCategory.OtherNotAssigned));
System.Globalization (1)
System.Globalization.cs (1)
13[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.UnicodeCategory))]
System.Private.CoreLib (81)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (35)
95private static UnicodeCategory GetLatin1UnicodeCategory(char c) 98return (UnicodeCategory)(Latin1CharInfo[c] & UnicodeCategoryMask); 369return CharUnicodeInfo.GetUnicodeCategory(c) == UnicodeCategory.DecimalDigitNumber; 385private static bool IsBetween(UnicodeCategory c, UnicodeCategory min, UnicodeCategory max) => 391internal static bool CheckLetter(UnicodeCategory uc) 393return IsBetween(uc, UnicodeCategory.UppercaseLetter, UnicodeCategory.OtherLetter); 444return CharUnicodeInfo.GetUnicodeCategory(c) == UnicodeCategory.UppercaseLetter; 458return CharUnicodeInfo.GetUnicodeCategory(c) == UnicodeCategory.LowercaseLetter; 461internal static bool CheckPunctuation(UnicodeCategory uc) 463return IsBetween(uc, UnicodeCategory.ConnectorPunctuation, UnicodeCategory.OtherPunctuation); 481internal static bool CheckLetterOrDigit(UnicodeCategory uc) 4841 << (int)UnicodeCategory.UppercaseLetter | 4851 << (int)UnicodeCategory.LowercaseLetter | 4861 << (int)UnicodeCategory.TitlecaseLetter | 4871 << (int)UnicodeCategory.ModifierLetter | 4881 << (int)UnicodeCategory.OtherLetter | 4891 << (int)UnicodeCategory.DecimalDigitNumber; 699return CharUnicodeInfo.GetUnicodeCategoryInternal(s, index) == UnicodeCategory.DecimalDigitNumber; 757return CharUnicodeInfo.GetUnicodeCategoryInternal(s, index) == UnicodeCategory.LowercaseLetter; 764internal static bool CheckNumber(UnicodeCategory uc) 766return IsBetween(uc, UnicodeCategory.DecimalDigitNumber, UnicodeCategory.OtherNumber); 836internal static bool CheckSeparator(UnicodeCategory uc) 838return IsBetween(uc, UnicodeCategory.SpaceSeparator, UnicodeCategory.ParagraphSeparator); 900internal static bool CheckSymbol(UnicodeCategory uc) 902return IsBetween(uc, UnicodeCategory.MathSymbol, UnicodeCategory.OtherSymbol); 946return CharUnicodeInfo.GetUnicodeCategoryInternal(s, index) == UnicodeCategory.UppercaseLetter; 966public static UnicodeCategory GetUnicodeCategory(char c) 975public static UnicodeCategory GetUnicodeCategory(string s, int index)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CharUnicodeInfo.cs (7)
357public static UnicodeCategory GetUnicodeCategory(char ch) 362public static UnicodeCategory GetUnicodeCategory(int codePoint) 372public static UnicodeCategory GetUnicodeCategory(string s, int index) 390internal static UnicodeCategory GetUnicodeCategoryInternal(string value, int index) 402internal static UnicodeCategory GetUnicodeCategoryInternal(string str, int index, out int charLength) 415private static UnicodeCategory GetUnicodeCategoryNoBoundsChecks(uint codePoint) 421return (UnicodeCategory)(Unsafe.AddByteOffset(ref MemoryMarshal.GetReference(CategoriesValues), offset) & 0x1F);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (3)
851UnicodeCategory category = Rune.GetUnicodeCategory(result); 852if (category == UnicodeCategory.PrivateUse || category == UnicodeCategory.OtherNotAssigned)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\NumberFormatInfo.cs (1)
151CharUnicodeInfo.GetUnicodeCategory(nativeDig[i], 0) != UnicodeCategory.PrivateUse)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TextInfo.cs (10)
633UnicodeCategory charType = CharUnicodeInfo.GetUnicodeCategoryInternal(str, i, out int charLen); 655bool hasLowerCase = (charType == UnicodeCategory.LowercaseLetter); 663if (charType == UnicodeCategory.LowercaseLetter) 850private static bool IsWordSeparator(UnicodeCategory category) 855private static bool IsLetterCategory(UnicodeCategory uc) 857return uc == UnicodeCategory.UppercaseLetter 858|| uc == UnicodeCategory.LowercaseLetter 859|| uc == UnicodeCategory.TitlecaseLetter 860|| uc == UnicodeCategory.ModifierLetter 861|| uc == UnicodeCategory.OtherLetter;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Rune.cs (25)
1314public static UnicodeCategory GetUnicodeCategory(Rune value) 1318return (UnicodeCategory)(AsciiCharInfo[value.Value] & UnicodeCategoryMask); 1326private static UnicodeCategory GetUnicodeCategoryNonAscii(Rune value) 1341private static bool IsCategoryLetter(UnicodeCategory category) 1343return UnicodeUtility.IsInRangeInclusive((uint)category, (uint)UnicodeCategory.UppercaseLetter, (uint)UnicodeCategory.OtherLetter); 1347private static bool IsCategoryLetterOrDecimalDigit(UnicodeCategory category) 1349return UnicodeUtility.IsInRangeInclusive((uint)category, (uint)UnicodeCategory.UppercaseLetter, (uint)UnicodeCategory.OtherLetter) 1350|| (category == UnicodeCategory.DecimalDigitNumber); 1354private static bool IsCategoryNumber(UnicodeCategory category) 1356return UnicodeUtility.IsInRangeInclusive((uint)category, (uint)UnicodeCategory.DecimalDigitNumber, (uint)UnicodeCategory.OtherNumber); 1360private static bool IsCategoryPunctuation(UnicodeCategory category) 1362return UnicodeUtility.IsInRangeInclusive((uint)category, (uint)UnicodeCategory.ConnectorPunctuation, (uint)UnicodeCategory.OtherPunctuation); 1366private static bool IsCategorySeparator(UnicodeCategory category) 1368return UnicodeUtility.IsInRangeInclusive((uint)category, (uint)UnicodeCategory.SpaceSeparator, (uint)UnicodeCategory.ParagraphSeparator); 1372private static bool IsCategorySymbol(UnicodeCategory category) 1374return UnicodeUtility.IsInRangeInclusive((uint)category, (uint)UnicodeCategory.MathSymbol, (uint)UnicodeCategory.OtherSymbol); 1399return GetUnicodeCategoryNonAscii(value) == UnicodeCategory.DecimalDigitNumber; 1435return GetUnicodeCategoryNonAscii(value) == UnicodeCategory.LowercaseLetter; 1474return GetUnicodeCategoryNonAscii(value) == UnicodeCategory.UppercaseLetter;
System.Private.Xml (43)
src\runtime\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)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
260[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.UnicodeCategory))]
System.Runtime.Serialization.Schema (11)
System\Runtime\Serialization\Schema\CodeExporter.cs (11)
1659return (char.GetUnicodeCategory(c) != UnicodeCategory.DecimalDigitNumber); 1664UnicodeCategory uc = char.GetUnicodeCategory(c); 1670case UnicodeCategory.UppercaseLetter: // Lu 1671case UnicodeCategory.LowercaseLetter: // Ll 1672case UnicodeCategory.TitlecaseLetter: // Lt 1673case UnicodeCategory.ModifierLetter: // Lm 1674case UnicodeCategory.OtherLetter: // Lo 1675case UnicodeCategory.DecimalDigitNumber: // Nd 1676case UnicodeCategory.NonSpacingMark: // Mn 1677case UnicodeCategory.SpacingCombiningMark: // Mc 1678case UnicodeCategory.ConnectorPunctuation: // Pc
System.Text.Json (6)
src\runtime\src\libraries\System.Text.Json\Common\JsonSeparatorNamingPolicy.cs (6)
59UnicodeCategory category = char.GetUnicodeCategory(current); 63case UnicodeCategory.UppercaseLetter: 116case UnicodeCategory.LowercaseLetter: 117case UnicodeCategory.DecimalDigitNumber: 130if (category is UnicodeCategory.LowercaseLetter) 144case UnicodeCategory.SpaceSeparator:
System.Text.Json.SourceGeneration (6)
src\runtime\src\libraries\System.Text.Json\Common\JsonSeparatorNamingPolicy.cs (6)
59UnicodeCategory category = char.GetUnicodeCategory(current); 63case UnicodeCategory.UppercaseLetter: 116case UnicodeCategory.LowercaseLetter: 117case UnicodeCategory.DecimalDigitNumber: 130if (category is UnicodeCategory.LowercaseLetter) 144case UnicodeCategory.SpaceSeparator:
System.Text.RegularExpressions (90)
System\Text\RegularExpressions\RegexCharClass.cs (45)
519public static bool TryGetOnlyCategories(string set, Span<UnicodeCategory> categories, out int numCategories, out bool negated) 551categories[numCategories++] = (UnicodeCategory)(c - 1); 567categories[numCategories++] = (UnicodeCategory)(-1 - c); 590categories[numCategories++] = (UnicodeCategory)(c - 1); 611categories[numCategories++] = (UnicodeCategory)(-1 - c); 800Span<UnicodeCategory> categories1 = stackalloc UnicodeCategory[16], categories2 = stackalloc UnicodeCategory[16]; 821foreach (UnicodeCategory cat1 in categories1.Slice(0, numCategories1)) 823foreach (UnicodeCategory cat2 in categories2.Slice(0, numCategories2)) 920Span<UnicodeCategory> categories1 = stackalloc UnicodeCategory[16], categories2 = stackalloc UnicodeCategory[16]; 924foreach (UnicodeCategory cat1 in categories1.Slice(0, numCategories1)) 927foreach (UnicodeCategory cat2 in categories2.Slice(0, numCategories2)) 986case UnicodeCategory.ClosePunctuation: 987case UnicodeCategory.ConnectorPunctuation: 988case UnicodeCategory.Control: 989case UnicodeCategory.DashPunctuation: 990case UnicodeCategory.DecimalDigitNumber: 991case UnicodeCategory.FinalQuotePunctuation: 992case UnicodeCategory.InitialQuotePunctuation: 993case UnicodeCategory.LineSeparator: 994case UnicodeCategory.OpenPunctuation: 995case UnicodeCategory.OtherNumber: 996case UnicodeCategory.OtherPunctuation: 997case UnicodeCategory.ParagraphSeparator: 998case UnicodeCategory.SpaceSeparator: 11711 << (int)UnicodeCategory.UppercaseLetter | 11721 << (int)UnicodeCategory.LowercaseLetter | 11731 << (int)UnicodeCategory.TitlecaseLetter | 11741 << (int)UnicodeCategory.ModifierLetter | 11751 << (int)UnicodeCategory.OtherLetter | 11761 << (int)UnicodeCategory.NonSpacingMark | 11771 << (int)UnicodeCategory.DecimalDigitNumber | 11781 << (int)UnicodeCategory.ConnectorPunctuation; 1216private static bool IsWordCategory(UnicodeCategory category) => 1366UnicodeCategory chcategory = char.GetUnicodeCategory(ch); 1391else if (chcategory == (UnicodeCategory)(curcat - 1)) 1406else if (chcategory != (UnicodeCategory)(-1 - curcat)) 1420private static bool CharInCategoryGroup(UnicodeCategory chcategory, ReadOnlySpan<char> category, ref int i) 1432result |= chcategory == (UnicodeCategory)(curcat - 1); 1444result &= chcategory != (UnicodeCategory)(-1 - curcat); 2044(short)(UnicodeCategory.DecimalDigitNumber + 1) => @"\d", 2045-(short)(UnicodeCategory.DecimalDigitNumber + 1) => @"\D",
System\Text\RegularExpressions\RegexCompiler.cs (1)
5964Span<UnicodeCategory> categories = [default]; // handle the case of one and only one category
System\Text\RegularExpressions\Symbolic\CharSetSolver.cs (1)
127BDD 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> 28Debug.Assert(Enum.GetValues<UnicodeCategory>().Length == UnicodeCategoryValueCount); 32/// <summary>Gets a <see cref="BDD"/> that represents the specified <see cref="UnicodeCategory"/>.</summary> 33public static BDD GetCategory(UnicodeCategory category) => 51GetCategory(UnicodeCategory.UppercaseLetter), 52GetCategory(UnicodeCategory.LowercaseLetter), 53GetCategory(UnicodeCategory.TitlecaseLetter), 54GetCategory(UnicodeCategory.ModifierLetter), 55GetCategory(UnicodeCategory.OtherLetter), 56GetCategory(UnicodeCategory.NonSpacingMark), 57GetCategory(UnicodeCategory.DecimalDigitNumber), 58GetCategory(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 (63)
RegexGenerator.Emitter.cs (18)
682Span<UnicodeCategory> categories = stackalloc UnicodeCategory[5]; // arbitrary limit to keep names from being too unwieldy 1208(UnicodeCategory.UppercaseLetter or 1209UnicodeCategory.LowercaseLetter or 1210UnicodeCategory.TitlecaseLetter or 1211UnicodeCategory.ModifierLetter or 1212UnicodeCategory.LetterNumber or 1213UnicodeCategory.OtherLetter or 1214UnicodeCategory.DecimalDigitNumber or 1215UnicodeCategory.ConnectorPunctuation or 1216UnicodeCategory.SpacingCombiningMark or 1217UnicodeCategory.NonSpacingMark or 1218UnicodeCategory.Format)) 5258Span<UnicodeCategory> categories = stackalloc UnicodeCategory[30]; // number of UnicodeCategory values (though it's unheard of to have a set with all of them) 5262foreach (UnicodeCategory category in categories.Slice(0, numCategories)) 5700Span<UnicodeCategory> categories = stackalloc UnicodeCategory[1];
src\runtime\src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (45)
519public static bool TryGetOnlyCategories(string set, Span<UnicodeCategory> categories, out int numCategories, out bool negated) 551categories[numCategories++] = (UnicodeCategory)(c - 1); 567categories[numCategories++] = (UnicodeCategory)(-1 - c); 590categories[numCategories++] = (UnicodeCategory)(c - 1); 611categories[numCategories++] = (UnicodeCategory)(-1 - c); 800Span<UnicodeCategory> categories1 = stackalloc UnicodeCategory[16], categories2 = stackalloc UnicodeCategory[16]; 821foreach (UnicodeCategory cat1 in categories1.Slice(0, numCategories1)) 823foreach (UnicodeCategory cat2 in categories2.Slice(0, numCategories2)) 920Span<UnicodeCategory> categories1 = stackalloc UnicodeCategory[16], categories2 = stackalloc UnicodeCategory[16]; 924foreach (UnicodeCategory cat1 in categories1.Slice(0, numCategories1)) 927foreach (UnicodeCategory cat2 in categories2.Slice(0, numCategories2)) 986case UnicodeCategory.ClosePunctuation: 987case UnicodeCategory.ConnectorPunctuation: 988case UnicodeCategory.Control: 989case UnicodeCategory.DashPunctuation: 990case UnicodeCategory.DecimalDigitNumber: 991case UnicodeCategory.FinalQuotePunctuation: 992case UnicodeCategory.InitialQuotePunctuation: 993case UnicodeCategory.LineSeparator: 994case UnicodeCategory.OpenPunctuation: 995case UnicodeCategory.OtherNumber: 996case UnicodeCategory.OtherPunctuation: 997case UnicodeCategory.ParagraphSeparator: 998case UnicodeCategory.SpaceSeparator: 11711 << (int)UnicodeCategory.UppercaseLetter | 11721 << (int)UnicodeCategory.LowercaseLetter | 11731 << (int)UnicodeCategory.TitlecaseLetter | 11741 << (int)UnicodeCategory.ModifierLetter | 11751 << (int)UnicodeCategory.OtherLetter | 11761 << (int)UnicodeCategory.NonSpacingMark | 11771 << (int)UnicodeCategory.DecimalDigitNumber | 11781 << (int)UnicodeCategory.ConnectorPunctuation; 1216private static bool IsWordCategory(UnicodeCategory category) => 1366UnicodeCategory chcategory = char.GetUnicodeCategory(ch); 1391else if (chcategory == (UnicodeCategory)(curcat - 1)) 1406else if (chcategory != (UnicodeCategory)(-1 - curcat)) 1420private static bool CharInCategoryGroup(UnicodeCategory chcategory, ReadOnlySpan<char> category, ref int i) 1432result |= chcategory == (UnicodeCategory)(curcat - 1); 1444result &= chcategory != (UnicodeCategory)(-1 - curcat); 2044(short)(UnicodeCategory.DecimalDigitNumber + 1) => @"\d", 2045-(short)(UnicodeCategory.DecimalDigitNumber + 1) => @"\D",
System.Windows.Forms (8)
System\Windows\Forms\Controls\UpDown\DomainUpDown.cs (8)
342UnicodeCategory uc = char.GetUnicodeCategory(character[0]); 344if (uc is UnicodeCategory.LetterNumber 345or UnicodeCategory.LowercaseLetter 346or UnicodeCategory.DecimalDigitNumber 347or UnicodeCategory.MathSymbol 348or UnicodeCategory.OtherLetter 349or UnicodeCategory.OtherNumber 350or UnicodeCategory.UppercaseLetter)
System.Windows.Forms.Design (6)
System\ComponentModel\Design\ByteViewer.cs (6)
172UnicodeCategory uc = char.GetUnicodeCategory(c); 173return uc is not UnicodeCategory.Control 174and not UnicodeCategory.Format 175and not UnicodeCategory.LineSeparator 176and not UnicodeCategory.ParagraphSeparator 177and not 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)