Lines type

Array of strings which comprise a text which is treated as a unit for purposes of output (and maybe for other purposes later).

Direct parent types

ArrLike
Parent type for user-defined types with array-like behaviour. Use in cases when you would like to inherit from built-in Arr. Inheriting from built-ins is not possible for now.
Direct subtypes: 6

Methods

echo(lines:Lines) Source: stdlib.ngs:7277
Echo all lines using echo(Str)
echo(dst:Any, lines:Lines) Source: stdlib.ngs:7281
Echo all lines to dst
echo(f:File, l:Lines) Source: stdlib.ngs:7942
Write a lines followed by newline character to a File. Throws WriteFail on failure.

Returns

null

Example

echo(File("1.txt"), Lines(["aaa", "bbb"]))
error(lines:Lines) Source: stdlib.ngs:7289
Write all lines to standard error using error(Str)
framed(lines:Lines)experimental Source: stdlib.ngs:7296
Undocumented
init(lines:Lines, s:Str) Source: stdlib.ngs:7267
Split s to strings using end-of-line separators. UNIX and Windows line endings supported (Windows - not tested yet). Warning: Max OS <= 9 line separation of CR (\r) is not supported

Example

"xx\nyy".lines()  # %[xx yy]
init(lines:Lines, backtrace:Backtrace, parent_backtrace:Any=null) Source: stdlib.ngs:7451
Convert Backtrace to human-readable format

Example

Lines(bt).echo()
warn(lines:Lines) Source: stdlib.ngs:7286
Write all lines to standard error using warn(Str)