diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-06-09 19:37:51 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-06-09 19:37:51 -0700 |
commit | 2ea6ca3ef8151d94d2a3f306a9035ae7ae001fcd (patch) | |
tree | 8e6f8f294f2ec6e32171a71e5f04b4e0a847c1c0 /txr.1 | |
parent | 3e1962283c934b374829667f693244e5d23ee25b (diff) | |
download | txr-2ea6ca3ef8151d94d2a3f306a9035ae7ae001fcd.tar.gz txr-2ea6ca3ef8151d94d2a3f306a9035ae7ae001fcd.tar.bz2 txr-2ea6ca3ef8151d94d2a3f306a9035ae7ae001fcd.zip |
* lib.c (match_str): Extended to suffix testing, with a negative
start argument.
* txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -8884,12 +8884,21 @@ Syntax: .TP Description: -The match-str function determines how many characters of <littlestring> match a -prefix of <bigstring>. +Without the <start> argument, the match-str function determines whether +<littlestring> is a prefix of <bigstring>, returning a t or nil +indication. -If the <start> argument is specified, then the function tests how many -characters of <littlestring> match a prefix of that portion of <bigstring> -which starts at the given position. +If the <start> argument is specified, and is a non-negative integer, then the +function tests whether <littlestring> matches a prefix of that portion of +<bigstring> which starts at the given position. + +If the <start> argument is a negative integer, then match-str determines +whether <littlestring> is a suffix of <bigstring>, ending on that position +of bigstring, where -1 denotes the last character of <bigstring>, +-2 the second last one and so on. + +If <start> is -1, then this corresponds to testing whether <littlestring> +is a suffix of <bigstring>. .SS Function match-str-tree |