Update docs for lookup() interpolation function

Add specifics about using the optional third argument for providing a
default value.
This commit is contained in:
David Adams 2016-05-25 19:35:09 -05:00
parent b5d1279107
commit 8a4fdc3dd5
1 changed files with 4 additions and 2 deletions

View File

@ -160,9 +160,11 @@ The supported built-in functions are:
* `${length(split(",", "a,b,c"))}` = 3 * `${length(split(",", "a,b,c"))}` = 3
* `${length("a,b,c")}` = 5 * `${length("a,b,c")}` = 5
* `lookup(map, key)` - Performs a dynamic lookup into a mapping * `lookup(map, key [, default])` - Performs a dynamic lookup into a mapping
variable. The `map` parameter should be another variable, such variable. The `map` parameter should be another variable, such
as `var.amis`. as `var.amis`. If `key` does not exist in `map`, the interpolation will
fail unless you specify a third argument, `default`, which should be a
string value to return if no `key` is found in `map.
* `lower(string)` - Returns a copy of the string with all Unicode letters mapped to their lower case. * `lower(string)` - Returns a copy of the string with all Unicode letters mapped to their lower case.