Natural sorting: Difference between revisions

Content deleted Content added
Alextretyak (talk | contribs)
Added 11l
Alextretyak (talk | contribs)
Line 98:
F natOrderKey(=s)
// Remove leading and trailing white spaces.
s = s.trim((‘ ’, "\t", "\r", "\n"))
"\t",
"\r",
"\n"))
 
// Make all whitespace characters equivalent and remove adjacent spaces.
s = s.replace(re:‘\s+’, ‘ ’)
‘ ’)
 
// Switch to lower case.