-
-
Notifications
You must be signed in to change notification settings - Fork 202
Add Chars concept #715
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
base: main
Are you sure you want to change the base?
Add Chars concept #715
Conversation
Extended Unicode discussion, based on your forum post. There's now a (still too long) introduction, so I'll move this PR out of draft. |
- Test character type with: | ||
- [`isLetter()`][ref-isletter], covers many alphabets | ||
- [`isDigit()`][ref-isdigit], in range 0..9 | ||
- `isLetterOrDigit()`, combines the previous two | ||
- [`isWhitespace()`][ref-iswhitespace], any whitespace character |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Test character type with: | |
- [`isLetter()`][ref-isletter], covers many alphabets | |
- [`isDigit()`][ref-isdigit], in range 0..9 | |
- `isLetterOrDigit()`, combines the previous two | |
- [`isWhitespace()`][ref-iswhitespace], any whitespace character | |
- Test character type with: | |
- [`isLetter()`][ref-isletter], covers many alphabets (the Lu, Ll, Lt, Lm, and Lo categories in unicode) | |
- [`isDigit()`][ref-isdigit], in range 0..9 (the Nd category in unicode) | |
- `isLetterOrDigit()`, combines the previous two | |
- [`isWhitespace()`][ref-iswhitespace], any whitespace character (the Cc, Zp, Zl, and Zs categories in unicode) |
I think this is the correct markdown format.
For about.md only, I think we can explain how it's implemented by specifying the unicode categories (that's how these functions work!)
kt.joinToString("_") // => "k_o_t_l_i_n" | ||
``` | ||
|
||
Note that `joinToString()` operates on a List or Array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that `joinToString()` operates on a List or Array. | |
Note that `joinToString()` operates on a List or Array. |
What was the reason for this sentence?
Co-authored-by: Derk-Jan Karrenbeld <[email protected]>
Co-authored-by: Derk-Jan Karrenbeld <[email protected]>
Co-authored-by: Derk-Jan Karrenbeld <[email protected]>
Co-authored-by: Derk-Jan Karrenbeld <[email protected]>
Co-authored-by: Derk-Jan Karrenbeld <[email protected]>
Co-authored-by: Derk-Jan Karrenbeld <[email protected]>
I'm a bit confused about the way Kotlin implements Unicode as fixed-width 16-bit, so I'll ask for clarification on the forum before marking this ready for review.