Adjust the indentation at the start of each line of data.

Syntax

Smartsite SXML CopyCode image Copy Code
string string.indent(string data, integer tabCount)
string string.indent(string data, integer tabCount, boolean resetIndent)
string string.indent(string data, integer tabCount, boolean resetIndent, boolean trimBlankLines)

Parameters

Name Data Type Description
data String The input string consisting of one or more lines of text.
tabCount Integer Number of tabs to insert at the start of each line
resetIndent Boolean Remove the existing indentation before adding the new one. The existing indention is determined by counting the number of tabs at the start of the first non-blank line.
trimBlankLines Boolean Trim blank lines at the begin and end of the text.

Return Value

Data Type Description
String The indented string.

Expand image Example

SXML