TrimSpace.md - hugo - [fork] hugo port for 9front
(HTM) git clone https://git.drkhsh.at/hugo.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
TrimSpace.md (562B)
---
1 ---
2 title: strings.TrimSpace
3 description: Returns the given string, removing leading and trailing whitespace as defined by Unicode.
4 categories: []
5 keywords: []
6 params:
7 functions_and_methods:
8 returnType: string
9 signatures: [strings.TrimSpace INPUT]
10 ---
11
12 {{< new-in 0.136.3 />}}
13
14 Whitespace characters include `\t`, `\n`, `\v`, `\f`, `\r`, and characters in the [Unicode Space Separator] category.
15
16 [Unicode Space Separator]: https://www.compart.com/en/unicode/category/Zs
17
18 ```go-html-template
19 {{ strings.TrimSpace "\n\r\t foo \n\r\t" }} → foo
20 ```