mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 15:52:16 -05:00
29 lines
869 B
Markdown
29 lines
869 B
Markdown
---
|
|
title: strings.ContainsNonSpace
|
|
description: Reports whether the given string contains any non-space characters as defined by Unicode.
|
|
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 >}}
|
|
|
|
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
|
|
|
|
```go-html-template
|
|
{{ strings.ContainsNonSpace "\n" }} → false
|
|
{{ strings.ContainsNonSpace " " }} → false
|
|
{{ strings.ContainsNonSpace "\n abc" }} → true
|
|
```
|