Files
opentf/website/docs/configuration/functions/coalesce.html.md
Martin Atkins e7d71995f6 website: Document the remaining "collection" functions
This also renames some of the existing function pages whose source
filenames were not matching the usual naming scheme (.html.md).
2018-10-16 18:47:33 -07:00

713 B

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
functions coalesce function docs-funcs-collection-coalesce-x The coalesce function takes any number of string arguments and returns the first one that isn't empty.

coalesce Function

coalesce takes any number of string arguments and returns the first one that isn't empty.

Examples

> coalesce("a", "b")
a
> coalesce("", "b")
b

To perform the coalesce operation with a list of strings, use the ... symbol to expand the list as arguments:

> coalesce(["", "b"]...)
b
  • coalescelist performs a similar operation with list arguments rather than string arguments.