[stdlib] Improve documentation of Char.isWhitespace and test it behaves the same in different targets

This commit is contained in:
Ilya Gorbunov
2024-02-19 22:23:23 +01:00
committed by Space Team
parent baca742a31
commit 709076acc9
6 changed files with 38 additions and 5 deletions
@@ -74,7 +74,12 @@ public actual fun Char.isDigit(): Boolean {
}
/**
* Determines whether a character is whitespace according to the Unicode standard.
* Determines whether a character is whitespace.
*
* A character is considered whitespace if either its Unicode [category][Char.category]
* is one of [CharCategory.SPACE_SEPARATOR], [CharCategory.LINE_SEPARATOR], [CharCategory.PARAGRAPH_SEPARATOR],
* or it is a [CharCategory.CONTROL] character in range `U+0009..U+000D` or `U+001C..U+001F`.
*
* Returns `true` if the character is whitespace.
*
* @sample samples.text.Chars.isWhitespace