From: Yitzchak Scott-Thoennes Date: Fri, 2 Sep 2005 14:23:00 +0000 (+0000) Subject: document index() with out of bounds POSITION X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=26f149dec464aaa222f29ebbe78cfacf17b2f77c;p=p5sagit%2Fp5-mst-13.2.git document index() with out of bounds POSITION Message-ID: <20050902122311.GA3104@efn.org> p4raw-id: //depot/perl@25351 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 09d98b0..f687728 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -2339,7 +2339,9 @@ The index function searches for one string within another, but without the wildcard-like behavior of a full regular-expression pattern match. It returns the position of the first occurrence of SUBSTR in STR at or after POSITION. If POSITION is omitted, starts searching from the -beginning of the string. The return value is based at C<0> (or whatever +beginning of the string. POSITION before the beginning of the string +or after its end is treated as if it were the beginning or the end, +respectively. POSITION and the return value are based at C<0> (or whatever you've set the C<$[> variable to--but don't do that). If the substring is not found, C returns one less than the base, ordinarily C<-1>.