Contents

isWhitespace

A Boolean value indicating whether this character represents whitespace, including newlines.

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

See Also

Inspecting a Character