445 B
445 B
Named & Default Arguments (#3)
Implement a joinComments()
function which takes a String
parameter
containing comment text. joinComments()
joins the lines of the comment text,
removing newlines and using a default of ;
as the line separator. It removes
the comment slashes along with any whitespace after the slashes (//
).
Use the extension function lines()
to split a String
into a list of
lines.