String Enclose Example
The viper string.enclose adds a prefix and/or suffix to the given string, but only if the source string is non-empty.
Smartsite SXML | Copy Code |
---|---|
{string.enclose("mark", "water")} => "watermark" {string.enclose("", "water")} => "" {string.enclose("mark", "water", "ing")} => "watermarking" {string.enclose("", "water", "ing")} => "" {string.enclose("mark", "water", "")} => "watermark" {string.enclose("mark", "", "ing")} => "marking" |
Example Result | Copy Code |
---|---|
watermark => "watermark" => "" watermarking => "watermarking" => "" watermark => "watermark" marking => "marking" |