SortStringLines

Top  Previous  Next

sub SortStringLines(ByRef s)

 

Sorts all lines in the string s. Lines must be separated by a carriage return linefeed (chr(13)+chr(10), or CRLF).

 

Parameters

 

s ... String expression.

 

Example:

Dim s

 

= "Lucas" + Chr(13) + Chr(10) + "Simon" + Chr(13) + Chr(10) + "Ann"

SortStringLines(s)

' returns s = "Ann"#13#10"Lucas"#13#10"Simon"




Translate document: