Document strings.ContainsNonSpace

This commit is contained in:
Joe Mooring 2023-08-06 11:00:20 -07:00 committed by GitHub
parent 8dbe5df90b
commit 9046bf424b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,27 @@
---
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