hugo/docs/content/en/functions/strings.ContainsNonSpace.md
2023-08-07 10:38:12 +02:00

28 lines
763 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 a string contains any non-space characters as defined by Unicodes White Space property.
categories: [functions]
menu:
docs:
parent: functions
keywords: [whitespace space]
signature: ["strings.ContainsNonSpace STRING"]
relatedfuncs: ["strings.Contains","strings.ContainsAny"]
---
```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