mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-25 22:00:58 +02:00
Merge commit '7c62d6ef1654c0383eae474d3bd9ddf7754c1f30'
This commit is contained in:
27
docs/content/en/functions/strings.ContainsNonSpace.md
Normal file
27
docs/content/en/functions/strings.ContainsNonSpace.md
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
title: strings.ContainsNonSpace
|
||||
description: Reports whether a string contains any non-space characters as defined by Unicode’s 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
|
Reference in New Issue
Block a user