A Boolean value indicating whether this character represents whitespace, including newlines.
SDK
- Xcode 10.2+
Framework
- Swift Standard Library
Declaration
var isWhitespace: Bool { get }
Discussion
For example, the following characters all represent whitespace:
“\t” (U+0009 CHARACTER TABULATION)
“ “ (U+0020 SPACE)
U+2029 PARAGRAPH SEPARATOR
U+3000 IDEOGRAPHIC SPACE