aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gawktexi.in
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-05-31 17:33:35 +0300
committerArnold D. Robbins <arnold@skeeve.com>2018-05-31 17:33:35 +0300
commitb92de42c775ab615e2dd49aff0b66da4c2c31be4 (patch)
tree26a3eff957ed72cf1396a7bd372b16533543d8e6 /doc/gawktexi.in
parentf006165d77037b99e205496d8b79cb80e9f280c0 (diff)
downloadegawk-b92de42c775ab615e2dd49aff0b66da4c2c31be4.tar.gz
egawk-b92de42c775ab615e2dd49aff0b66da4c2c31be4.tar.bz2
egawk-b92de42c775ab615e2dd49aff0b66da4c2c31be4.zip
Improve description of gensub().
Diffstat (limited to 'doc/gawktexi.in')
-rw-r--r--doc/gawktexi.in11
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index e857747e..6dfe92b0 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -17227,11 +17227,12 @@ a[3] = "middle"
@cindex substitute in string
Search the target string @var{target} for matches of the regular
expression @var{regexp}. If @var{how} is a string beginning with
-@samp{g} or @samp{G} (short for ``global''), then replace all matches of @var{regexp} with
-@var{replacement}. Otherwise, @var{how} is treated as a number indicating
-which match of @var{regexp} to replace. If no @var{target} is supplied,
-use @code{$0}. It returns the modified string as the result
-of the function and the original target string is @emph{not} changed.
+@samp{g} or @samp{G} (short for ``global''), then replace all matches
+of @var{regexp} with @var{replacement}. Otherwise, treat @var{how}
+as a number indicating which match of @var{regexp} to replace. Treat
+numeric values less than one as if they were one. If no @var{target}
+is supplied, use @code{$0}. Return the modified string as the result
+of the function. The original target string is @emph{not} changed.
@code{gensub()} is a general substitution function. Its purpose is
to provide more features than the standard @code{sub()} and @code{gsub()}