2024-01-27 04:48:33 -05:00
|
|
|
---
|
|
|
|
title: strings.ContainsNonSpace
|
2024-11-13 05:07:57 -05:00
|
|
|
description: Reports whether the given string contains any non-space characters as defined by Unicode.
|
2024-01-27 04:48:33 -05:00
|
|
|
categories: []
|
|
|
|
keywords: []
|
|
|
|
action:
|
|
|
|
aliases: []
|
|
|
|
related:
|
|
|
|
- functions/strings/Contains
|
|
|
|
- functions/strings/ContainsAny
|
|
|
|
- functions/strings/HasPrefix
|
|
|
|
- functions/strings/HasSuffix
|
|
|
|
- functions/collections/In
|
|
|
|
returnType: bool
|
|
|
|
signatures: [strings.ContainsNonSpace STRING]
|
|
|
|
aliases: [/functions/strings.containsnonspace]
|
|
|
|
---
|
|
|
|
|
|
|
|
{{< new-in 0.111.0 >}}
|
|
|
|
|
2024-11-13 05:07:57 -05:00
|
|
|
Whitespace characters include `\t`, `\n`, `\v`, `\f`, `\r`, and characters in the [Unicode Space Separator] category.
|
|
|
|
|
|
|
|
[Unicode Space Separator]: https://www.compart.com/en/unicode/category/Zs
|
|
|
|
|
2024-01-27 04:48:33 -05:00
|
|
|
```go-html-template
|
|
|
|
{{ strings.ContainsNonSpace "\n" }} → false
|
|
|
|
{{ strings.ContainsNonSpace " " }} → false
|
|
|
|
{{ strings.ContainsNonSpace "\n abc" }} → true
|
|
|
|
```
|