aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/content/en/functions/strings/ContainsNonSpace.md
blob: d2e6114b38c2ea2d5ffe4b819f3a811ec5bcc2aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
title: strings.ContainsNonSpace
description: Reports whether a string contains any non-space characters as defined by Unicode’s White Space property.
categories: [functions]
keywords: []
menu:
  docs:
    parent: functions
function:
  aliases: []
  returnType: bool
  signatures: [strings.ContainsNonSpace STRING]
relatedFunctions:
  - strings.Contains
  - strings.ContainsAny
  - strings.ContainsNonSpace
  - strings.HasPrefix
  - strings.HasSuffix
aliases: [/functions/strings.containsnonspace]
---

```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