Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Problems in System.Char.cs #1195

Open
nan01ab opened this issue Oct 4, 2024 · 0 comments
Open

Some Problems in System.Char.cs #1195

nan01ab opened this issue Oct 4, 2024 · 0 comments

Comments

@nan01ab
Copy link
Contributor

nan01ab commented Oct 4, 2024

According to the previous two issues(#1193, #1194), there are some different implementations with C# stdlib on determining a char is white space or not(and string.Trim and char.IsWhiteSpace is different too).

Then I checked other methods in System.Char.cs, and found that HandleCharIsPunctuation and HandleCharIsSymbol are different semantics with C# stdlib on ASCII chars.

HandleCharIsPunctuation: for char set [ 33 - 47, 59 - 64, 91 - 96, 123 - 126],
char.IsPunctuation returns true when char in set [33, 34, 35, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 58, 59, 63, 64, 91, 92, 93, 95, 123, 125].

HandleCharIsSymbol: for char set [ 36 - 43, 60 - 64, 91 - 96, 123 - 126],
char.IsSymbol returns true when char in set [ 36, 43, 60, 61, 62, 94, 96, 124, 126].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant