Function: org-string-collate-lessp

org-string-collate-lessp is a function alias for string-collate-lessp, defined in fns.c.

This function is obsolete since 9.6; use string-collate-lessp instead.

Signature

(org-string-collate-lessp S1 S2 &optional LOCALE IGNORE-CASE)

Documentation

Return t if first arg string is less than second in collation order.

Symbols are also allowed; their print names are used instead.

This function obeys the conventions for collation order in your locale settings. For example, punctuation and whitespace characters might be considered less significant for sorting:

(sort '("11" "12" "1 1" "1 2" "1.1" "1.2") 'string-collate-lessp)
  => ("11" "1 1" "1.1" "12" "1 2" "1.2")

The optional argument LOCALE, a string, overrides the setting of your current locale identifier for collation. The value is system dependent; a LOCALE "en_US.UTF-8" is applicable on POSIX systems, while it would be, e.g., "enu_USA.1252" on MS-Windows systems.

If IGNORE-CASE is non-nil, characters are converted to lower-case before comparing them.

To emulate Unicode-compliant collation on MS-Windows systems, bind w32-collate-ignore-punctuation to a non-nil value, since the codeset part of the locale cannot be "UTF-8" on MS-Windows.

Some operating systems do not implement correct collation (in specific locale environments or at all). Then, this functions falls back to case-sensitive string-lessp and IGNORE-CASE argument is ignored.

Aliases

org-string-collate-lessp (obsolete since 9.6)