[manual] Specify what is the return value of strrep

Francesco Potorti` Potorti at isti.cnr.it
Wed Oct 1 06:30:37 CDT 2008


No changelog for this trivial change.

I managed to put non-ascii7 characters in my name by setting the env var
HGENCODING=ISO-8859-15.

Now, does anyone know ho to pass additional parameters to the diff used
by 'hg export'?  I would like to pass -pb, but I cannot guess how.

# HG changeset patch
# User Francesco Potortì <pot at gnu.org>
# Date 1222860453 -7200
# Node ID 81277bb56fce8ebdcbe389a980793298081d30b8
# Parent  364d9c8e033ed6512482c4572cdf05f529492b76
Specify what is the return value.

diff -r 364d9c8e033e -r 81277bb56fce scripts/strings/strrep.m
--- a/scripts/strings/strrep.m	Sat Sep 27 15:45:48 2008 +0200
+++ b/scripts/strings/strrep.m	Wed Oct 01 13:27:33 2008 +0200
@@ -20,7 +20,7 @@
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} strrep (@var{s}, @var{x}, @var{y})
 ## Replaces all occurrences of the substring @var{x} of the string @var{s}
-## with the string @var{y}.  For example,
+## with the string @var{y} and returns the result.  For example,
 ##
 ## @example
 ## strrep ("This is a test string", "is", "&%$")
@@ -79,7 +79,7 @@
     t(dest) = y(repeat);
   else                        # deletion
     ## Build an index vector of all locations where the target was found
-    ## in the search string, and zap them. 
+    ## in the search string, and zap them.
     t = toascii (s);
     repeat = [1:length(x)]' * ones (1, length (ind));
     delete = ones (length (x), 1) * ind + repeat - 1;
@@ -95,4 +95,3 @@
 %!error strrep ();
 
 %!error strrep ("foo", "bar", 3, 4);
-


More information about the Bug-octave mailing list