diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-06-10 07:29:56 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-06-10 07:29:56 -0700 |
commit | 79f55cbf6c6e7412473e119a02aa637e985721f5 (patch) | |
tree | 7f8d7fc468dc5499431e570b3704a22e243999df /txr.1 | |
parent | 06e308526e9c612eaf6e36c36f2213bb915038e4 (diff) | |
download | txr-79f55cbf6c6e7412473e119a02aa637e985721f5.tar.gz txr-79f55cbf6c6e7412473e119a02aa637e985721f5.tar.bz2 txr-79f55cbf6c6e7412473e119a02aa637e985721f5.zip |
* eval.c (eval_init): Change registration of string_cmp
to cmp_str. Add registrations for str_eq, str_lt,
str_gt, str_le, and str_lt.
* lib.c (string_cmp): Name changes to cmp_str, and the
function fixed so that it actually works.
The name change doesn't affect anyone because the function
was too broken to use due to the incorrect type dispatch.
(string_lt): Name changes to str_lt.
(str_eq, str_gt, str_le, str_ge): New functions.
* lib.h (string_cmp, string_lt): Declarations renamed.
(str_eq, str_gt, str_le, str_ge): New declarations.
* txr.1: Document string-cmp to cmp-str rename, that
string-lt is deprecated, and the new str<, str>,
str>=, str<= and str= functions.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 66 |
1 files changed, 47 insertions, 19 deletions
@@ -9075,22 +9075,6 @@ The trim-str function produces a copy of <string> from which leading and trailing whitespace is removed. Whitespace consists of spaces, tabs, carriage returns, linefeeds, vertical tabs and form feeds. -.SS Function string-lt - -.TP -Syntax: - - (string-lt <left-str> <right-str>) - -.TP -Description: - -The string-lt function returns t if <left-str> is lexicographically prior -to <right-str>. The behavior does not depend on any kind of locale. - -Note that this function forces (fully instantiates) any lazy string arguments, -even if doing is is not necessary. - .SS Function chrp .TP @@ -9611,17 +9595,17 @@ These functions can be used to test such as string whether it is longer or shorter than a given length, without forcing the string beyond that length. -.SS Function string-cmp +.SS Function cmp-str .TP Syntax: - (string-cmp <left-string> <right-string>) + (cmp-str <left-string> <right-string>) .TP Semantics: -The string-cmp function returns a negative integer if <left-string> +The cmp-str function returns a negative integer if <left-string> is lexicographically prior to <right-string>, and a positive integer if the reverse situation is the case. Otherwise the strings are equal and zero is returned. @@ -9635,6 +9619,50 @@ The lexicographic ordering is naive, based on the character code point values in Unicode taken as integers, without regard for locale-specific collation orders. +.SS Functions str=, str<, str>, str>= and str<= + +.TP +Syntax: + + (str= <left-string> <right-string>) + (str< <left-string> <right-string>) + (str> <left-string> <right-string>) + (str<= <left-string> <right-string>) + (str>= <left-string> <right-string>) + +.TP +Semantics: + +These functions compare <left-string> and <right-string> lexicographically, +as if by the cmp-str function. + +The str= function returns t if the two strings are exactly the same, character +for character, otherwise it returns nil. + +The str< function returns t if <left-string> is lexicographically before +<right-string>, otherwise nil. + +The str> function returns t if <left-string> is lexicographically after +<right-string>, otherwise nil. + +The str< function returns t if <left-string> is lexicographically before +<right-string>, or if they are exactly the same, otherwise nil. + +The str< function returns t if <left-string> is lexicographically after +<right-string>, or if they are exactly the same, otherwise nil. + +.SS Function string-lt + +.TP +Syntax: + + (string-lt <left-str> <right-str>) + +.TP +Description: + +The string-lt is a deprecated alias for str<. + .SH VECTORS .SS Function vector |