Split Text Into Lines | TEXT_LINES

Syntax

TEXT_LINES( [value] )

Parameters

value
The TEXT to split. If it is not a TEXT value, it will be converted to one with the STRING operation.

Return Value

An ARRAY of TEXT values.

Description

Split a TEXT into lines. This operation is equivalent to TEXT_SPLIT(value, "/\r?\n/")

Examples

# VALUE is
# "’Twas brillig, and the slithy toves
# Did gyre and gimble in the wabe:
# All mimsy were the borogoves,
# And the mome raths outgrabe."
TEXT_LINES(VALUE)
# returns [
#  "’Twas brillig, and the slithy toves",
#  "Did gyre and gimble in the wabe:",
#  "All mimsy were the borogoves,",
#  "And the mome raths outgrabe."
# ]
TEXT_LINES("") # returns [""]
TEXT_LINES(null) # returns [""]
TEXT_LINES(1234) # returns ["1234"]