Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,15 @@ The above returns `true` because `catch` has the prefix `cat`.
These functions wrap a string in double quotes (`quote`) or single quotes
(`squote`).

`quote` formats each value with Go's `%q` verb, so the contents are escaped
with Go string syntax. That makes the result safe to embed in generated Go
code. Helm often recommends `quote` when rendering YAML string values; note
that Go `%q` escaping is not identical to YAML or JSON string rules in every
edge case.

`squote` wraps each value in single quotes using plain `%v` formatting and
does not escape quotes or other special characters inside the value.

## cat

The `cat` function concatenates multiple strings together into one, separating
Expand Down