hugo/content/en/functions/strings/ContainsNonSpace.md
Bjørn Erik Pedersen 9b0050e9aa Squashed 'docs/' content from commit 5c085a37b
git-subtree-dir: docs
git-subtree-split: 5c085a37b297bf12f59efeaae591418ec025c10d
2024-01-27 10:48:33 +01:00

35 lines
936 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: strings.ContainsNonSpace
description: Reports whether the given string contains any non-space characters as defined by Unicodes White Space property.
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 >}}
```go-html-template
{{ strings.ContainsNonSpace "\n" }} → false
{{ strings.ContainsNonSpace " " }} → false
{{ strings.ContainsNonSpace "\n abc" }} → true
```
Common white space characters include:
```text
'\t', '\n', '\v', '\f', '\r', ' '
```
See the [Unicode Character Database] for a complete list.
[Unicode Character Database]: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt