comparison website/src/manual.html @ 1422:e48290f3d9fb

better quoting
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 17 Nov 2019 16:28:51 -0700
parents 9dfff82dfc59
children 56fb5cd8228d
comparison
equal deleted inserted replaced
1421:8ab2f0fc3829 1422:e48290f3d9fb
2414 x = String.gsub("$name-$version.tar.gz", [[\$(\w+)]], t) 2414 x = String.gsub("$name-$version.tar.gz", [[\$(\w+)]], t)
2415 --&gt; x="lua-5.3.tar.gz" 2415 --&gt; x="lua-5.3.tar.gz"
2416 </pre> 2416 </pre>
2417 2417
2418 2418
2419
2420 <h4 heading><a name="String.literal" href="#String.literal"><code>String.literal (s)</code></a></h4>
2421 <p>
2422 Returns a string which matches the literal string <code>s</code> in a regular expression. This function is simply the Java method <a href="http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#quote(java.lang.String)"><code>Pattern.quote</code></a>.
2423
2424
2425 <h4 heading><a name="String.lower" href="#String.lower"><code>String.lower (s)</code></a></h4> 2419 <h4 heading><a name="String.lower" href="#String.lower"><code>String.lower (s)</code></a></h4>
2426 <p> 2420 <p>
2427 Receives a string and returns a copy of this string with all 2421 Receives a string and returns a copy of this string with all
2428 uppercase letters changed to lowercase. 2422 uppercase letters changed to lowercase.
2429 All other characters are left unchanged. 2423 All other characters are left unchanged.
2430
2431 2424
2432 2425
2433 2426
2434 <h4 heading><a name="String.match" href="#String.match"><code>String.match (s, pattern [, init])</code></a></h4> 2427 <h4 heading><a name="String.match" href="#String.match"><code>String.match (s, pattern [, init])</code></a></h4>
2435 2428
2452 This function is equivalent to 2445 This function is equivalent to
2453 2446
2454 <pre> 2447 <pre>
2455 return String.match(s,pattern) ~= nil 2448 return String.match(s,pattern) ~= nil
2456 </pre> 2449 </pre>
2450
2451
2452 <h4 heading><a name="String.regex_quote" href="#String.regex_quote"><code>String.regex_quote (s)</code></a></h4>
2453 <p>
2454 Returns a string which matches the literal string <code>s</code> in a regular expression. This function is simply the Java method <a href="http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#quote(java.lang.String)"><code>Pattern.quote</code></a>.
2457 2455
2458 2456
2459 <h4 heading><a name="String.rep" href="#String.rep"><code>String.rep (s, n [, sep])</code></a></h4> 2457 <h4 heading><a name="String.rep" href="#String.rep"><code>String.rep (s, n [, sep])</code></a></h4>
2460 <p> 2458 <p>
2461 Returns a string that is the concatenation of <code>n</code> copies of 2459 Returns a string that is the concatenation of <code>n</code> copies of