Warning: This is the manual of the legacy Guile 2.2 series. You may want to read the manual of the current stable series instead.

Next: , Previous: , Up: Internationalization   [Contents][Index]


6.25.2 Text Collation

The following procedures provide support for text collation, i.e., locale-dependent string and character sorting.

Scheme Procedure: string-locale<? s1 s2 [locale]
C Function: scm_string_locale_lt (s1, s2, locale)
Scheme Procedure: string-locale>? s1 s2 [locale]
C Function: scm_string_locale_gt (s1, s2, locale)
Scheme Procedure: string-locale-ci<? s1 s2 [locale]
C Function: scm_string_locale_ci_lt (s1, s2, locale)
Scheme Procedure: string-locale-ci>? s1 s2 [locale]
C Function: scm_string_locale_ci_gt (s1, s2, locale)

Compare strings s1 and s2 in a locale-dependent way. If locale is provided, it should be locale object (as returned by make-locale) and will be used to perform the comparison; otherwise, the current system locale is used. For the -ci variants, the comparison is made in a case-insensitive way.

Scheme Procedure: string-locale-ci=? s1 s2 [locale]
C Function: scm_string_locale_ci_eq (s1, s2, locale)

Compare strings s1 and s2 in a case-insensitive, and locale-dependent way. If locale is provided, it should be a locale object (as returned by make-locale) and will be used to perform the comparison; otherwise, the current system locale is used.

Scheme Procedure: char-locale<? c1 c2 [locale]
C Function: scm_char_locale_lt (c1, c2, locale)
Scheme Procedure: char-locale>? c1 c2 [locale]
C Function: scm_char_locale_gt (c1, c2, locale)
Scheme Procedure: char-locale-ci<? c1 c2 [locale]
C Function: scm_char_locale_ci_lt (c1, c2, locale)
Scheme Procedure: char-locale-ci>? c1 c2 [locale]
C Function: scm_char_locale_ci_gt (c1, c2, locale)

Compare characters c1 and c2 according to either locale (a locale object as returned by make-locale) or the current locale. For the -ci variants, the comparison is made in a case-insensitive way.

Scheme Procedure: char-locale-ci=? c1 c2 [locale]
C Function: scm_char_locale_ci_eq (c1, c2, locale)

Return true if character c1 is equal to c2, in a case insensitive way according to locale or to the current locale.


Next: , Previous: , Up: Internationalization   [Contents][Index]