Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Description

Resolves to the specified line(s) of variable data for the specified variable.

  • If the variable is unresolved, the function will remain unresolved.

  • If the variable is undefined, blank, or no lines qualify, the function will resolve to the default value.

Syntax

${_varLines('variableName', startLine, numberOfLines[, 'defaultValue', 'resultDelimiter'])}

Parameters

variableName
Required; The name of the variable to apply the function to.

startLine
Required; Start line, where 1 is the first line and -1 is the last line.

numberOfLines
Required; Number of lines to return starting from the startLine.

defaultValue
Optional; Default value to return if no lines qualify. Default is empty ('').

resultDelimiter
Optional; Delimiter to use when concatenating matching lines. If not specified, "\n" or "\r\n" depending on original output line endings.

Example

my_variable=
Line 1
Line 2
Line 3
Line 4

${_varLines('my_variable', 2, 2)}
>
Line 2
Line 3

...