Method ToStrings
ToStrings(StringBuilder)
Converts the contents of the provided StringBuilder into an array of strings, splitting on CRLF, LF or CR line endings. Trailing empty lines are preserved (i.e. "a\n" -> ["a",""]).
public static string[] ToStrings(StringBuilder builder)
Parameters
builderStringBuilderThe StringBuilder to split.
Returns
- string[]
An array of lines.
Exceptions
- ArgumentNullException
If
builderis null.