diff website/src/manual.html.luan @ 1721:5c69d2e8bd75

no regex in String.find and String.split
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 26 Jul 2022 12:44:52 -0600
parents 2f3a8f16f583
children 7d2ab44f7a59
line wrap: on
line diff
--- a/website/src/manual.html.luan	Mon Jul 25 17:31:50 2022 -0600
+++ b/website/src/manual.html.luan	Tue Jul 26 12:44:52 2022 -0600
@@ -2446,23 +2446,18 @@
 						end
 					}
 					["String.find"] = {
-						title = "<code>String.find (s, pattern [, init [, plain]])</code>"
+						title = "<code>String.find (s, s2 [, init])</code>"
 						content = function()
 %>
 <p>
-Looks for the first match of
-<code>pattern</code> (see <a href="http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html">Pattern</a>) in the string <code>s</code>.
+Looks for the first substring
+<code>s2</code> in the string <code>s</code>.
 If it finds a match, then <code>find</code> returns the indices of&nbsp;<code>s</code>
 where this occurrence starts and ends;
 otherwise, it returns <b>nil</b>.
 A third, optional numerical argument <code>init</code> specifies
 where to start the search;
 its default value is&nbsp;1 and can be negative.
-A value of <b>true</b> as a fourth, optional argument <code>plain</code>
-turns off the pattern matching facilities,
-so the function does a plain "find substring" operation,
-with no characters in <code>pattern</code> being considered magic.
-Note that if <code>plain</code> is given, then <code>init</code> must be given as well.
 </p>
 
 <p>
@@ -2709,11 +2704,11 @@
 						end
 					}
 					["String.split"] = {
-						title = "<code>String.split (s, pattern [, limit])</code>"
+						title = "<code>String.split (s, s2 [, limit])</code>"
 						content = function()
 %>
 <p>
-Splits <code>s</code> using regex <code>pattern</code> and returns the results.  If <code>limit</code> is positive, then only returns at most that many results.  If <code>limit</code> is zero, then remove trailing empty results.
+Splits <code>s</code> using substring <code>s2</code> and returns the results.  If <code>limit</code> is positive, then only returns at most that many results.  If <code>limit</code> is zero, then remove trailing empty results.
 </p>
 <%
 						end