add Line Numbers
fun addLineNumbers( source: String, pattern: String, startingLineNumber: Int): String
Content copied to clipboard
Add line numbers to the given string. Start the numbering at the specified value.
Return
The string containing line numbers.
Parameters
source
The string to add line numbers to.
pattern
The pattern to use on each line. The first pattern argument is the line number (int), and the second is the String containing the line, including a terminal '\n'.
starting Line Number
What to number the first line as.