The 'string>' [string-greater-than] function takes two string arguments. A non-NIL value is returned if 'string1' is greater than 'string2' in ASCII ordering, otherwise NIL is returned. The non-NIL value returned is the integer index of the first character of 'string1' which is char> [char-greater-than] the corresponding character of 'string2'. This test is case sensitive, the character '#\a' is different and of greater ASCII value than '#\A'.
The keyword arguments allow for accessing substrings within 'string1' and 'string2'. The keyword arguments each require a keyword ':start1', ':end1', ':start2' or ':end2' and a single integer expression as a pair with the keyword first and the integer second. The pairs may be in any order. The ':startN' keywords specify the starting offset of the substring. A value of 0 starts the string at the beginning [no offset]. The ':endN' keywords specify the ending offset of the substring. A value of 3 ends the string after the 3rd character [an offset of 3 characters].
(string> "a" "b") ; returns NIL (string> "a" "a") ; returns NIL (string> "a" "A") ; returns 0 (string> "A" "a") ; returns NIL (string> "abc" "abc ") ; returns NIL (string> "1234qrst" "12345678") ; returns 4 (string> "J Smith" "K Jones" :start1 1 :start2 1) ; strip off the first chars ; returns 2
See the
string>
function in the