Mwnci lines() Function

Syntax

lines(string|array)

Description

The lines() function returns the amount of lines in a string (where lines are separated by “\n”).

An array can also be used, for which the amount of elements return.

Example

a="These are\na few\nlines of\ntext we need\nto count"
println(lines(a),"\n", a)


5
These are
a few
lines of
text we need
to count