Description
Splits a string into lines. Returns by default an array of trimmed, non-empty lines within the string. Recognizes all types of line endings.
Examples
[%$lines = lines("/etc/passwd"); %]
|
Parameters4
Coding name |
str
|
Description |
The string to be split into lines.
|
Position |
1
|
Type |
String(Primitive type)
|
Coding name |
empty
|
Description |
Whether empty lines should be included.
|
Position |
1
|
Type |
Boolean(Primitive type)
|
Default value |
False, empty lines are not included.
|
Coding name |
trim
|
Description |
Whether all whitespace should be trimmed on both sides of the line.
|
Position |
2
|
Type |
Boolean(Primitive type)
|
Default value |
True, whitespace is trimmed.
|
Coding name |
newline
|
Description |
Whether the newline should be kept at the end of the line.
|
Position |
3
|
Type |
Boolean(Primitive type)
|
Default value |
Fasle, newlines are not kept.
|
|