diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-12-10 23:44:31 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-12-10 23:44:31 -0800 |
commit | 3fba129958c4287490f324538548d3db8077c5ee (patch) | |
tree | c82ce0ce92da2fb80b7b5a3d656ab35def5a92fa | |
parent | 9132c01460eec7be4575ee2ea01f94d15bbdb90a (diff) | |
download | txr-3fba129958c4287490f324538548d3db8077c5ee.tar.gz txr-3fba129958c4287490f324538548d3db8077c5ee.tar.bz2 txr-3fba129958c4287490f324538548d3db8077c5ee.zip |
doc: improve span-str, compl-span-str, break-str
* txr.1: document return value better for span-str and
compl-span-str. Add examples for all three functions.
-rw-r--r-- | txr.1 | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -26658,6 +26658,18 @@ consists only of the characters in string .metn set , in any combination. +If both arguments are strings, the function returns +an integer between 0 and the length of +.metn str . + +.TP* Examples: +.verb + (span-str "abcde" "ab") -> 2 + (span-str "abcde" "z") -> 0 + (span-str "abcde" "") -> 0 + (span-str "abcde" "edcba") -> 5 +.brev + .coNP Function @ compl-span-str .synb .mets (compl-span-str < str << set ) @@ -26672,6 +26684,19 @@ consists only of the characters which do not appear in .metn set , in any combination. +If both arguments are strings, the function returns +an integer between 0 and the length of +.metn str . + +.TP* Examples: +.verb + (compl-span-str "abc,def" ",") -> 3 + (compl-span-str "abc," ",") -> 3 + (compl-span-str "abc" ",") -> 3 + (compl-span-str "abc3" "0123456789") -> 3 + (compl-span-str "3" "0123456789") -> 0 +.brev + .coNP Function @ break-str .synb .mets (break-str < str << set ) @@ -26689,6 +26714,13 @@ If there is no such character, then .code nil is returned. +.TP* Examples: +.verb + (break-str "abc,def.ghi" ",.:") -> 3 + (break-str "abc,def.ghi" ".:") -> 6 + (break-str "abc,def.ghi" ":") -> nil +.brev + .SS* Lazy Strings Lazy strings are objects that were developed for the \*(TX pattern-matching language, and are exposed via \*(TL. Lazy strings behave much like strings, |