| [Overview][Resource strings][Constants][Types][Procedures and functions][Index] | 
Compare using natural sort
Source position: strutils.pp line 60
| function NaturalCompareText( | 
| const S1: string; | 
| const S2: string | 
| ):Integer; | 
| const Str1: string; | 
| const Str2: string; | 
| const ADecSeparator: Char; | 
| const AThousandSeparator: Char | 
| ):Integer; | 
NaturalCompareText will compare 2 strings and return one of the following values:
When S1 and S2 are integer or floating point values, the actual values are compared. Thus '12' will come after '2'. If either of the values is not a valid integer or floating point values, the strings are compared case insensitively as texts using CompareText
A decimal separator and thousands separator can optionally be specified in ADecSeparator, AThousandSeparator. If none are specified, the defaults from the system unit will be used.