Softanza
StartFrançais
Softanza
The library documents itself · String

stzStringLines

29 own methods · 22 forms written with extensions, listed under their method

the source: base/string/stzStringLines.ring(opens in a new tab) · All classes · The area reference: String

Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean

Examples: 0 come from the library's tests; 22 were composed from each method's signature and run for this page, on a fresh object, for example cDup = "aaa" + NL + "bbb" + NL + "aaa" o1 = new stzStringLines(cDup). 7 methods have none yet. Examples run on 2026-10-03 20:23 inside the library at commit 0e72e2e2c.

Method
Explanation, as the source carries it
init
(no comment in the source: the name reads as a sentence) initno extension
Content
(no comment in the source: the name reads as a sentence) contentno extension
NumberOfChars
(no comment in the source: the name reads as a sentence) number of chars
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? o1.NumberOfChars()
#--> 11
composed from the signature, run for this page
no extension
IsEmpty
(no comment in the source: the name reads as a sentence) is empty
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? o1.IsEmpty()
#--> 0
composed from the signature, run for this page
no extension
Lines
lines
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? @@( o1.Lines() )
#--> [ "aaa", "bbb", "aaa" ]
composed from the signature, run for this page
QCSXTZZZIBWU
NumberOfLines
number of linesalso written: CountLines · HowManyLines
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? o1.NumberOfLines()
#--> 3
composed from the signature, run for this page
QCSXTZZZIBWU
NthLine
The nth line of the string.also written: Line
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? o1.NthLine(2)
#--> bbb
composed from the signature, run for this page
no extension
FirstLine
Same as NthLine: The nth line of the string.
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? o1.FirstLine()
#--> aaa
composed from the signature, run for this page
no extension
LastLine
The last line of the string.
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? o1.LastLine()
#--> aaa
composed from the signature, run for this page
no extension
UniqueLines
Same as UniqueLinesCS: The unique lines of the string.
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? @@( o1.UniqueLines() )
#--> [ "aaa", "bbb" ]
composed from the signature, run for this page
QCSXTZZZIBWU
RemoveEmptyLines
empty linesQCSXTZZZIBWU
EmptyLinesRemoved
empty linesno extension
NumberOfEmptyLines
empty lines
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? o1.NumberOfEmptyLines()
#--> -8
composed from the signature, run for this page
no extension
HasEmptyLines
empty lines
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? o1.HasEmptyLines()
#--> 0
composed from the signature, run for this page
no extension
NFirstLines
n first / n last lines
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? @@( o1.NFirstLines(2) )
#--> [ "aaa", "bbb" ]
composed from the signature, run for this page
no extension
NLastLines
n first / n last lines
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? @@( o1.NLastLines(2) )
#--> [ "bbb", "aaa" ]
composed from the signature, run for this page
no extension
LongestLine
longest / shortest line
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? o1.LongestLine()
#--> aaa
composed from the signature, run for this page
no extension
ShortestLine
longest / shortest line
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? o1.ShortestLine()
#--> aaa
composed from the signature, run for this page
no extension
AverageLineLength
average line length
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? o1.AverageLineLength()
#--> 3
composed from the signature, run for this page
no extension
SortLines
sort lines
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
o1.SortLines()
? o1.Content()
#--> aaa
#--> aaa
#--> bbb
composed from the signature, run for this page
QCSXTZZZIBWU
LinesSorted
sort lines
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? o1.LinesSorted()
#--> aaa
#--> aaa
#--> bbb
composed from the signature, run for this page
QCSXTZZZIBWU
ReverseLinesOrder
reverse lines orderQCSXTZZZIBWU
LinesOrderReversed
reverse lines orderno extension
IndentLines
indent linesQCSXTZZZIBWU
LinesIndented
indent lines
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? o1.LinesIndented(2)
#--> aaa
#-->   bbb
#-->   aaa
composed from the signature, run for this page
no extension
RemoveDuplicateLines
remove duplicate lines
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
o1.RemoveDuplicateLines()
? o1.Content()
#--> aaa
#--> bbb
composed from the signature, run for this page
QCSXTZZZIBWU
DuplicateLinesRemoved
remove duplicate lines
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? o1.DuplicateLinesRemoved()
#--> aaa
#--> bbb
composed from the signature, run for this page
QCSXTZZZIBWU
LineContaining
lines containing
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? o1.LineContaining("a")
#--> aaa
composed from the signature, run for this page
QCSXTZZZIBWU
LinesContaining
The lines containing the given substring. (case-sensitive by default)
composed example
cDup = "aaa" + NL + "bbb" + NL + "aaa"
o1 = new stzStringLines(cDup)
? @@( o1.LinesContaining("a") )
#--> [ "aaa", "aaa" ]
composed from the signature, run for this page
QCSXTZZZIBWU