HUGO
Menu
GitHub 90272 stars Mastodon

strings.ContainsNonSpace

Reports whether the given string contains any non-space characters as defined by Unicode.
Syntax
strings.ContainsNonSpace STRING
Returns
bool

Usage

The strings.ContainsNonSpace function reports whether the given string contains any non-space characters as defined by Unicode. Whitespace characters include \t, \n, \v, \f, \r, and characters in the Unicode Space Separator category.

Examples

{{ strings.ContainsNonSpace "\n" }} → false
{{ strings.ContainsNonSpace " " }} → false
{{ strings.ContainsNonSpace "\n abc" }} → true