Lines type
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:8572
Echo all lines using echo(Str)
- echo(dst:Any, lines:Lines) Source: stdlib.ngs:8576
Echo all lines to dst
- echo(f:File, l:Lines) Source: stdlib.ngs:9337
Write a lines followed by newline character to a File. Throws WriteFail on failure. Returns
nullExample
echo(File("1.txt"), Lines(["aaa", "bbb"]))
- error(lines:Lines) Source: stdlib.ngs:8584
Write all lines to standard error using error(Str)
- framed(lines:Lines)experimental Source: stdlib.ngs:8591
Undocumented
- init(lines:Lines, s:Str) Source: stdlib.ngs:8562
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:8744
Convert Backtrace to human-readable format Example
Lines(bt).echo()
- warn(lines:Lines) Source: stdlib.ngs:8581
Write all lines to standard error using warn(Str)