diff options
author | wl <wl> | 2013-02-16 08:39:31 +0000 |
---|---|---|
committer | wl <wl> | 2013-02-16 08:39:31 +0000 |
commit | 680d6e7b310c820c3323461ad94a0059e35d955c (patch) | |
tree | 2443789cca885a5d0d22fdc216d907bc1a09b1c5 /doc | |
parent | 118eda6b4f76451dde941d2d598fca2e385beae3 (diff) | |
download | groff-680d6e7b310c820c3323461ad94a0059e35d955c.tar.gz |
* doc/groff.texinfo: Improve documentation of `.substring'.
Reported by Jim Avera <james_avera@yahoo.com>.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/groff.texinfo | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/doc/groff.texinfo b/doc/groff.texinfo index d7752b8b..784b752e 100644 --- a/doc/groff.texinfo +++ b/doc/groff.texinfo @@ -10811,18 +10811,21 @@ requests. @Defreq {substring, str n1 [@Var{n2}]} @cindex substring (@code{substring}) Replace the string named @var{str} with the substring defined by the -indices @var{n1} and@tie{}@var{n2}. The first character in the string -has index@tie{}0. If @var{n2} is omitted, it is taken to be equal to -the string's length. If the index value @var{n1} or @var{n2} is -negative, it is counted from the end of the string, going backwards: The -last character has index@tie{}@minus{}1, the character before the last -character has index@tie{}@minus{}2, etc. +indices @var{n1} and @var{n2}. The first character in the string has +index@tie{}0. If @var{n2} is omitted, it is implicitly set to the +largest valid value (the string length minus one). If the index value +@var{n1} or @var{n2} is negative, it is counted from the end of the +string, going backwards: The last character has index@tie{}@minus{}1, +the character before the last character has index@tie{}@minus{}2, etc. @Example .ds xxx abcdefgh .substring xxx 1 -4 \*[xxx] @result{} bcde +.substring xxx 2 +\*[xxx] + @result{} de @endExample @endDefreq |