Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stevedonovan/Penlight.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThijs <thijs@thijsschreijer.nl>2020-08-05 11:30:23 +0300
committerThijs <thijs@thijsschreijer.nl>2020-08-05 11:30:23 +0300
commit76079c1f88af53245c134a9c9dbc9ac9510bbb2f (patch)
tree1e6077b4a8ed4de62af356213e96863593e424cf
parentbbeebf3059f11f5fc9cb93cf61ed9e41ff7272bd (diff)
release 1.8.0 docs1.8.0
-rw-r--r--docs/classes/pl.Date.html2
-rw-r--r--docs/classes/pl.List.html2
-rw-r--r--docs/classes/pl.Map.html2
-rw-r--r--docs/classes/pl.MultiMap.html2
-rw-r--r--docs/classes/pl.OrderedMap.html2
-rw-r--r--docs/classes/pl.Set.html2
-rw-r--r--docs/examples/seesubst.lua.html2
-rw-r--r--docs/examples/sipscan.lua.html2
-rw-r--r--docs/examples/symbols.lua.html2
-rw-r--r--docs/examples/test-cmp.lua.html2
-rw-r--r--docs/examples/test-data.lua.html2
-rw-r--r--docs/examples/test-listcallbacks.lua.html2
-rw-r--r--docs/examples/test-pretty.lua.html2
-rw-r--r--docs/examples/test-symbols.lua.html2
-rw-r--r--docs/examples/testclone.lua.html2
-rw-r--r--docs/examples/testconfig.lua.html2
-rw-r--r--docs/examples/testglobal.lua.html2
-rw-r--r--docs/examples/testinputfields.lua.html2
-rw-r--r--docs/examples/testinputfields2.lua.html2
-rw-r--r--docs/examples/testxml.lua.html2
-rw-r--r--docs/examples/which.lua.html2
-rw-r--r--docs/index.html4
-rw-r--r--docs/libraries/pl.app.html2
-rw-r--r--docs/libraries/pl.array2d.html2
-rw-r--r--docs/libraries/pl.class.html2
-rw-r--r--docs/libraries/pl.compat.html42
-rw-r--r--docs/libraries/pl.comprehension.html2
-rw-r--r--docs/libraries/pl.config.html4
-rw-r--r--docs/libraries/pl.data.html2
-rw-r--r--docs/libraries/pl.dir.html2
-rw-r--r--docs/libraries/pl.file.html2
-rw-r--r--docs/libraries/pl.func.html2
-rw-r--r--docs/libraries/pl.html2
-rw-r--r--docs/libraries/pl.import_into.html2
-rw-r--r--docs/libraries/pl.input.html2
-rw-r--r--docs/libraries/pl.lapp.html2
-rw-r--r--docs/libraries/pl.lexer.html2
-rw-r--r--docs/libraries/pl.luabalanced.html2
-rw-r--r--docs/libraries/pl.operator.html2
-rw-r--r--docs/libraries/pl.path.html393
-rw-r--r--docs/libraries/pl.permute.html2
-rw-r--r--docs/libraries/pl.pretty.html64
-rw-r--r--docs/libraries/pl.seq.html2
-rw-r--r--docs/libraries/pl.sip.html2
-rw-r--r--docs/libraries/pl.strict.html40
-rw-r--r--docs/libraries/pl.stringio.html2
-rw-r--r--docs/libraries/pl.stringx.html102
-rw-r--r--docs/libraries/pl.tablex.html100
-rw-r--r--docs/libraries/pl.template.html2
-rw-r--r--docs/libraries/pl.test.html2
-rw-r--r--docs/libraries/pl.text.html2
-rw-r--r--docs/libraries/pl.types.html2
-rw-r--r--docs/libraries/pl.url.html2
-rw-r--r--docs/libraries/pl.utils.html2
-rw-r--r--docs/libraries/pl.xml.html2
-rw-r--r--docs/manual/01-introduction.md.html2
-rw-r--r--docs/manual/02-arrays.md.html2
-rw-r--r--docs/manual/03-strings.md.html2
-rw-r--r--docs/manual/04-paths.md.html2
-rw-r--r--docs/manual/05-dates.md.html2
-rw-r--r--docs/manual/06-data.md.html16
-rw-r--r--docs/manual/07-functional.md.html2
-rw-r--r--docs/manual/08-additional.md.html2
-rw-r--r--docs/manual/09-discussion.md.html2
-rw-r--r--penlight-1.8.0-1.src.rockbin0 -> 534880 bytes
65 files changed, 646 insertions, 229 deletions
diff --git a/docs/classes/pl.Date.html b/docs/classes/pl.Date.html
index 182e7b0..17ac202 100644
--- a/docs/classes/pl.Date.html
+++ b/docs/classes/pl.Date.html
@@ -1039,7 +1039,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/classes/pl.List.html b/docs/classes/pl.List.html
index c3ac51d..aa14878 100644
--- a/docs/classes/pl.List.html
+++ b/docs/classes/pl.List.html
@@ -1436,7 +1436,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/classes/pl.Map.html b/docs/classes/pl.Map.html
index 6323140..7e16f91 100644
--- a/docs/classes/pl.Map.html
+++ b/docs/classes/pl.Map.html
@@ -447,7 +447,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/classes/pl.MultiMap.html b/docs/classes/pl.MultiMap.html
index a87b5b8..ff0aaf0 100644
--- a/docs/classes/pl.MultiMap.html
+++ b/docs/classes/pl.MultiMap.html
@@ -200,7 +200,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/classes/pl.OrderedMap.html b/docs/classes/pl.OrderedMap.html
index 844c307..d48552e 100644
--- a/docs/classes/pl.OrderedMap.html
+++ b/docs/classes/pl.OrderedMap.html
@@ -410,7 +410,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/classes/pl.Set.html b/docs/classes/pl.Set.html
index 25c6638..264110e 100644
--- a/docs/classes/pl.Set.html
+++ b/docs/classes/pl.Set.html
@@ -648,7 +648,7 @@ banana,apricot,apple,orange] [banana,apple,orange]
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/examples/seesubst.lua.html b/docs/examples/seesubst.lua.html
index fdae62e..e87485b 100644
--- a/docs/examples/seesubst.lua.html
+++ b/docs/examples/seesubst.lua.html
@@ -167,7 +167,7 @@ remember about @see pl.bonzo
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/examples/sipscan.lua.html b/docs/examples/sipscan.lua.html
index ba8f43d..a1112d3 100644
--- a/docs/examples/sipscan.lua.html
+++ b/docs/examples/sipscan.lua.html
@@ -154,7 +154,7 @@ SYNC [6] 0 587 (14679 sec)
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/examples/symbols.lua.html b/docs/examples/symbols.lua.html
index 4adebdd..6eba1ae 100644
--- a/docs/examples/symbols.lua.html
+++ b/docs/examples/symbols.lua.html
@@ -340,7 +340,7 @@ psexpr = compose(<span class="global">print</span>,sexpr)
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/examples/test-cmp.lua.html b/docs/examples/test-cmp.lua.html
index f789287..bc31495 100644
--- a/docs/examples/test-cmp.lua.html
+++ b/docs/examples/test-cmp.lua.html
@@ -123,7 +123,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/examples/test-data.lua.html b/docs/examples/test-data.lua.html
index 0040ad1..053a062 100644
--- a/docs/examples/test-data.lua.html
+++ b/docs/examples/test-data.lua.html
@@ -365,7 +365,7 @@ asserteq(d,{
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/examples/test-listcallbacks.lua.html b/docs/examples/test-listcallbacks.lua.html
index e22efab..0d7e402 100644
--- a/docs/examples/test-listcallbacks.lua.html
+++ b/docs/examples/test-listcallbacks.lua.html
@@ -131,7 +131,7 @@ actions:append(L <span class="string">'|| print "yay"'</span>)
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/examples/test-pretty.lua.html b/docs/examples/test-pretty.lua.html
index 9dedf22..3225ba6 100644
--- a/docs/examples/test-pretty.lua.html
+++ b/docs/examples/test-pretty.lua.html
@@ -133,7 +133,7 @@ you're so fine
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/examples/test-symbols.lua.html b/docs/examples/test-symbols.lua.html
index af24202..d019c39 100644
--- a/docs/examples/test-symbols.lua.html
+++ b/docs/examples/test-symbols.lua.html
@@ -202,7 +202,7 @@ testdiff(x*x*x)</pre>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/examples/testclone.lua.html b/docs/examples/testclone.lua.html
index 8a85212..f694ffc 100644
--- a/docs/examples/testclone.lua.html
+++ b/docs/examples/testclone.lua.html
@@ -158,7 +158,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/examples/testconfig.lua.html b/docs/examples/testconfig.lua.html
index 77a2080..977434f 100644
--- a/docs/examples/testconfig.lua.html
+++ b/docs/examples/testconfig.lua.html
@@ -169,7 +169,7 @@ testconfig <span class="string">[[
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/examples/testglobal.lua.html b/docs/examples/testglobal.lua.html
index 245f9cb..7d181d2 100644
--- a/docs/examples/testglobal.lua.html
+++ b/docs/examples/testglobal.lua.html
@@ -146,7 +146,7 @@ pretty.dump(seq.count_map(globals))</pre>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/examples/testinputfields.lua.html b/docs/examples/testinputfields.lua.html
index 64cf8ac..c6eecbe 100644
--- a/docs/examples/testinputfields.lua.html
+++ b/docs/examples/testinputfields.lua.html
@@ -133,7 +133,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/examples/testinputfields2.lua.html b/docs/examples/testinputfields2.lua.html
index 3a3e04a..0f23dec 100644
--- a/docs/examples/testinputfields2.lua.html
+++ b/docs/examples/testinputfields2.lua.html
@@ -129,7 +129,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/examples/testxml.lua.html b/docs/examples/testxml.lua.html
index 14e7435..db1698e 100644
--- a/docs/examples/testxml.lua.html
+++ b/docs/examples/testxml.lua.html
@@ -202,7 +202,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/examples/which.lua.html b/docs/examples/which.lua.html
index 5727ada..67a9ac6 100644
--- a/docs/examples/which.lua.html
+++ b/docs/examples/which.lua.html
@@ -148,7 +148,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/index.html b/docs/index.html
index 15edea7..42fe6fd 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -110,7 +110,7 @@
<div id="content">
- <h2>Penlight Lua Libraries 1.7.0</h2>
+ <h2>Penlight Lua Libraries 1.8.0</h2>
<p>The documentation is available <a href="manual/01-introduction.md.html#">here</a>.</p>
<h2>Libraries</h2>
@@ -382,7 +382,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.app.html b/docs/libraries/pl.app.html
index a023a2d..3e18bf4 100644
--- a/docs/libraries/pl.app.html
+++ b/docs/libraries/pl.app.html
@@ -388,7 +388,7 @@ params = {
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.array2d.html b/docs/libraries/pl.array2d.html
index deea110..60577e3 100644
--- a/docs/libraries/pl.array2d.html
+++ b/docs/libraries/pl.array2d.html
@@ -1143,7 +1143,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.class.html b/docs/libraries/pl.class.html
index bb7d5f8..285b538 100644
--- a/docs/libraries/pl.class.html
+++ b/docs/libraries/pl.class.html
@@ -325,7 +325,7 @@ class.B(A)
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.compat.html b/docs/libraries/pl.compat.html
index 1974ed0..77edd2f 100644
--- a/docs/libraries/pl.compat.html
+++ b/docs/libraries/pl.compat.html
@@ -181,8 +181,8 @@
<td class="summary">unpack a table and return the elements.</td>
</tr>
<tr>
- <td class="name" nowrap><a href="#package.searchpath">package.searchpath (mod, path)</a></td>
- <td class="summary">return the full path where a Lua module name would be matched.</td>
+ <td class="name" nowrap><a href="#package.searchpath">package.searchpath (name, path[, sep[, rep]])</a></td>
+ <td class="summary">return the full path where a file name would be matched.</td>
</tr>
</table>
@@ -203,7 +203,10 @@
Lua 5.2+.</p>
<p> NOTE: Windows systems can use signed 32bit integer exitcodes. Posix systems
- only use exitcodes 0-255, anything else is undefined.
+ only use exitcodes 0-255, anything else is undefined.</p>
+
+<p> NOTE2: In Lua 5.2 and 5.3 a Windows exitcode of -1 would not properly be
+ returned, this function will return it properly for all versions.
<h3>Parameters:</h3>
@@ -484,22 +487,43 @@
</dd>
<dt>
<a name = "package.searchpath"></a>
- <strong>package.searchpath (mod, path)</strong>
+ <strong>package.searchpath (name, path[, sep[, rep]])</strong>
</dt>
<dd>
- return the full path where a Lua module name would be matched.
+ return the full path where a file name would be matched.
+ This function was introduced in Lua 5.2, so this compatibility version
+ will be injected in Lua 5.1 engines.
<h3>Parameters:</h3>
<ul>
- <li><span class="parameter">mod</span>
- module name, possibly dotted
+ <li><span class="parameter">name</span>
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
+ file name, possibly dotted
</li>
<li><span class="parameter">path</span>
- a path in the same form as package.path or package.cpath
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
+ a path-template in the same form as package.path or package.cpath
+ </li>
+ <li><span class="parameter">sep</span>
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
+ template separate character to be replaced by path separator. Default: "."
+ (<em>optional</em>)
+ </li>
+ <li><span class="parameter">rep</span>
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
+ the path separator to use, defaults to system separator. Default; "/" on Unixes, "\" on Windows.
+ (<em>optional</em>)
</li>
</ul>
+ <h3>Returns:</h3>
+ <ol>
+ <li>
+ on success: path of the file</li>
+ <li>
+ on failure: nil, error string listing paths tried</li>
+ </ol>
<h3>See also:</h3>
@@ -516,7 +540,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.comprehension.html b/docs/libraries/pl.comprehension.html
index f746f44..b9b50cb 100644
--- a/docs/libraries/pl.comprehension.html
+++ b/docs/libraries/pl.comprehension.html
@@ -158,7 +158,7 @@ C <span class="string">'{x,y} for x for y'</span> ({<span class="number">1</span
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.config.html b/docs/libraries/pl.config.html
index 42f0a16..f633a09 100644
--- a/docs/libraries/pl.config.html
+++ b/docs/libraries/pl.config.html
@@ -220,7 +220,7 @@ ports = <span class="number">1002</span>,<span class="number">1003</span>,<span
<ul>
<li><code>smart</code> try to deduce what kind of config file we have (default false)</li>
- <li><code>variablilize</code> make names into valid Lua identifiers (default true)</li>
+ <li><code>variabilize</code> make names into valid Lua identifiers (default true)</li>
<li><code>convert_numbers</code> try to convert values into numbers (default true)</li>
<li><code>trim_space</code> ensure that there is no starting or trailing whitespace with values (default true)</li>
<li><code>trim_quotes</code> remove quotes from strings (default false)</li>
@@ -252,7 +252,7 @@ ports = <span class="number">1002</span>,<span class="number">1003</span>,<span
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.data.html b/docs/libraries/pl.data.html
index 2219b53..752f592 100644
--- a/docs/libraries/pl.data.html
+++ b/docs/libraries/pl.data.html
@@ -564,7 +564,7 @@ data.read <span class="string">'test.txt'</span>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.dir.html b/docs/libraries/pl.dir.html
index 2b2e997..fa39937 100644
--- a/docs/libraries/pl.dir.html
+++ b/docs/libraries/pl.dir.html
@@ -607,7 +607,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.file.html b/docs/libraries/pl.file.html
index d0954ab..0f6cc3d 100644
--- a/docs/libraries/pl.file.html
+++ b/docs/libraries/pl.file.html
@@ -294,7 +294,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.func.html b/docs/libraries/pl.func.html
index 2e5bce2..1ab967b 100644
--- a/docs/libraries/pl.func.html
+++ b/docs/libraries/pl.func.html
@@ -453,7 +453,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.html b/docs/libraries/pl.html
index 71ed042..d59f612 100644
--- a/docs/libraries/pl.html
+++ b/docs/libraries/pl.html
@@ -132,7 +132,7 @@ Updated to use <a href="../libraries/pl.import_into.html#">pl.import_into</a></p
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.import_into.html b/docs/libraries/pl.import_into.html
index 269d289..c3ef7da 100644
--- a/docs/libraries/pl.import_into.html
+++ b/docs/libraries/pl.import_into.html
@@ -135,7 +135,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.input.html b/docs/libraries/pl.input.html
index 5bec238..d9f2c3f 100644
--- a/docs/libraries/pl.input.html
+++ b/docs/libraries/pl.input.html
@@ -329,7 +329,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.lapp.html b/docs/libraries/pl.lapp.html
index 2c2788e..67dde03 100644
--- a/docs/libraries/pl.lapp.html
+++ b/docs/libraries/pl.lapp.html
@@ -375,7 +375,7 @@ Does some calculations
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.lexer.html b/docs/libraries/pl.lexer.html
index a4cb844..aaacf42 100644
--- a/docs/libraries/pl.lexer.html
+++ b/docs/libraries/pl.lexer.html
@@ -517,7 +517,7 @@ keyword <span class="keyword">do</span>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.luabalanced.html b/docs/libraries/pl.luabalanced.html
index 49e8ba1..1cf8777 100644
--- a/docs/libraries/pl.luabalanced.html
+++ b/docs/libraries/pl.luabalanced.html
@@ -142,7 +142,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.operator.html b/docs/libraries/pl.operator.html
index b84ebfd..f23193e 100644
--- a/docs/libraries/pl.operator.html
+++ b/docs/libraries/pl.operator.html
@@ -812,7 +812,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.path.html b/docs/libraries/pl.path.html
index a345675..0e694b8 100644
--- a/docs/libraries/pl.path.html
+++ b/docs/libraries/pl.path.html
@@ -121,18 +121,52 @@
<p>Path manipulation and file queries.</p>
<p> This is modelled after Python's os.path library (10.1); see <a href="../manual/04-paths.md.html#">the Guide</a>.</p>
+<p> NOTE: the functions assume the paths being dealt with to originate
+ from the OS the application is running on. Windows drive letters are not
+ to be used when running on a Unix system for example. The one exception
+ is Windows paths to allow both forward and backward slashes (since Lua
+ also accepts those)</p>
+
<p> Dependencies: <a href="../libraries/pl.utils.html#">pl.utils</a>, <a href="http://stevedonovan.github.io/lua-stdlibs/modules/lfs.html">lfs</a></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
+ <td class="name" nowrap><a href="#dir">dir ()</a></td>
+ <td class="summary">Lua iterator over the entries of a given directory.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#mkdir">mkdir ()</a></td>
+ <td class="summary">Creates a directory.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#rmdir">rmdir ()</a></td>
+ <td class="summary">Removes a directory.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#attrib">attrib ()</a></td>
+ <td class="summary">Gets attributes.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#currentdir">currentdir ()</a></td>
+ <td class="summary">Get the working directory.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#link_attrib">link_attrib ()</a></td>
+ <td class="summary">Gets symlink attributes.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#chdir">chdir ()</a></td>
+ <td class="summary">Changes the working directory.</td>
+ </tr>
+ <tr>
<td class="name" nowrap><a href="#isdir">isdir (P)</a></td>
<td class="summary">is this a directory?</td>
</tr>
<tr>
<td class="name" nowrap><a href="#isfile">isfile (P)</a></td>
- <td class="summary">is this a file?.</td>
+ <td class="summary">is this a file?</td>
</tr>
<tr>
<td class="name" nowrap><a href="#getsize">getsize (P)</a></td>
@@ -140,7 +174,7 @@
</tr>
<tr>
<td class="name" nowrap><a href="#exists">exists (P)</a></td>
- <td class="summary">does a path exist?.</td>
+ <td class="summary">does a path exist?</td>
</tr>
<tr>
<td class="name" nowrap><a href="#getatime">getatime (P)</a></td>
@@ -148,11 +182,11 @@
</tr>
<tr>
<td class="name" nowrap><a href="#getmtime">getmtime (P)</a></td>
- <td class="summary">Return the time of last modification</td>
+ <td class="summary">Return the time of last modification as the number of seconds since the epoch.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#getctime">getctime (P)</a></td>
- <td class="summary">Return the system's ctime.</td>
+ <td class="summary">Return the system's ctime as the number of seconds since the epoch.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#splitpath">splitpath (P)</a></td>
@@ -180,7 +214,7 @@
</tr>
<tr>
<td class="name" nowrap><a href="#isabs">isabs (P)</a></td>
- <td class="summary">is this an absolute path?.</td>
+ <td class="summary">is this an absolute path?</td>
</tr>
<tr>
<td class="name" nowrap><a href="#join">join (p1, p2, ...)</a></td>
@@ -218,26 +252,6 @@
<h2><a href="#Fields">Fields</a></h2>
<table class="function_list">
<tr>
- <td class="name" nowrap><a href="#dir">dir</a></td>
- <td class="summary">Lua iterator over the entries of a given directory.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#mkdir">mkdir</a></td>
- <td class="summary">Creates a directory.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#rmdir">rmdir</a></td>
- <td class="summary">Removes a directory.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#currentdir">currentdir</a></td>
- <td class="summary">Get the working directory.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#chdir">chdir</a></td>
- <td class="summary">Changes the working directory.</td>
- </tr>
- <tr>
<td class="name" nowrap><a href="#is_windows">is_windows</a></td>
<td class="summary">are we running Windows?</td>
</tr>
@@ -259,6 +273,113 @@
<dl class="function">
<dt>
+ <a name = "dir"></a>
+ <strong>dir ()</strong>
+ </dt>
+ <dd>
+ Lua iterator over the entries of a given directory.
+ Implicit link to <a href="https://keplerproject.github.io/luafilesystem/manual.html#reference"><code>luafilesystem.dir</code></a>
+
+
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "mkdir"></a>
+ <strong>mkdir ()</strong>
+ </dt>
+ <dd>
+ Creates a directory.
+ Implicit link to <a href="https://keplerproject.github.io/luafilesystem/manual.html#reference"><code>luafilesystem.mkdir</code></a>
+
+
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "rmdir"></a>
+ <strong>rmdir ()</strong>
+ </dt>
+ <dd>
+ Removes a directory.
+ Implicit link to <a href="https://keplerproject.github.io/luafilesystem/manual.html#reference"><code>luafilesystem.rmdir</code></a>
+
+
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "attrib"></a>
+ <strong>attrib ()</strong>
+ </dt>
+ <dd>
+ Gets attributes.
+ Implicit link to <a href="https://keplerproject.github.io/luafilesystem/manual.html#reference"><code>luafilesystem.attributes</code></a>
+
+
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "currentdir"></a>
+ <strong>currentdir ()</strong>
+ </dt>
+ <dd>
+ Get the working directory.
+ Implicit link to <a href="https://keplerproject.github.io/luafilesystem/manual.html#reference"><code>luafilesystem.currentdir</code></a>
+
+
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "link_attrib"></a>
+ <strong>link_attrib ()</strong>
+ </dt>
+ <dd>
+ Gets symlink attributes.
+ Implicit link to <a href="https://keplerproject.github.io/luafilesystem/manual.html#reference"><code>luafilesystem.symlinkattributes</code></a>
+
+
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "chdir"></a>
+ <strong>chdir ()</strong>
+ </dt>
+ <dd>
+ Changes the working directory.
+ On Windows, if a drive is specified, it also changes the current drive. If
+ only specifying the drive, it will only switch drive, but not modify the path.
+ Implicit link to <a href="https://keplerproject.github.io/luafilesystem/manual.html#reference"><code>luafilesystem.chdir</code></a>
+
+
+
+
+
+
+
+</dd>
+ <dt>
<a name = "isdir"></a>
<strong>isdir (P)</strong>
</dt>
@@ -284,7 +405,7 @@
<strong>isfile (P)</strong>
</dt>
<dd>
- is this a file?.
+ is this a file?
<h3>Parameters:</h3>
@@ -326,7 +447,7 @@
<strong>exists (P)</strong>
</dt>
<dd>
- does a path exist?.
+ does a path exist?
<h3>Parameters:</h3>
@@ -340,7 +461,7 @@
<h3>Returns:</h3>
<ol>
- the file path if it exists, nil otherwise
+ the file path if it exists (either as file, directory, socket, etc), nil otherwise
</ol>
@@ -373,7 +494,7 @@
<strong>getmtime (P)</strong>
</dt>
<dd>
- Return the time of last modification
+ Return the time of last modification as the number of seconds since the epoch.
<h3>Parameters:</h3>
@@ -394,7 +515,7 @@
<strong>getctime (P)</strong>
</dt>
<dd>
- Return the system's ctime.
+ Return the system's ctime as the number of seconds since the epoch.
<h3>Parameters:</h3>
@@ -427,9 +548,30 @@
</li>
</ul>
+ <h3>Returns:</h3>
+ <ol>
+ <li>
+ directory part</li>
+ <li>
+ file part</li>
+ </ol>
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example"><span class="keyword">local</span> dir, file = path.splitpath(<span class="string">"some/dir/myfile.txt"</span>)
+<span class="global">assert</span>(dir == <span class="string">"some/dir"</span>)
+<span class="global">assert</span>(file == <span class="string">"myfile.txt"</span>)
+
+<span class="keyword">local</span> dir, file = path.splitpath(<span class="string">"some/dir/"</span>)
+<span class="global">assert</span>(dir == <span class="string">"some/dir"</span>)
+<span class="global">assert</span>(file == <span class="string">""</span>)
+
+<span class="keyword">local</span> dir, file = path.splitpath(<span class="string">"some_dir"</span>)
+<span class="global">assert</span>(dir == <span class="string">""</span>)
+<span class="global">assert</span>(file == <span class="string">"some_dir"</span>)</pre>
+ </ul>
</dd>
<dt>
@@ -479,14 +621,24 @@
<ol>
<li>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
- root part</li>
+ root part (everything upto the "."", maybe empty)</li>
<li>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
- extension part (maybe empty)</li>
+ extension part (including the ".", maybe empty)</li>
</ol>
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example"><span class="keyword">local</span> file_path, ext = path.splitext(<span class="string">"/bonzo/dog_stuff/cat.txt"</span>)
+<span class="global">assert</span>(file_path == <span class="string">"/bonzo/dog_stuff/cat"</span>)
+<span class="global">assert</span>(ext == <span class="string">".txt"</span>)
+
+<span class="keyword">local</span> file_path, ext = path.splitext(<span class="string">""</span>)
+<span class="global">assert</span>(file_path == <span class="string">""</span>)
+<span class="global">assert</span>(ext == <span class="string">""</span>)</pre>
+ </ul>
</dd>
<dt>
@@ -505,9 +657,24 @@
</li>
</ul>
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
+ everything before the last dir-separator
+ </ol>
+ <h3>See also:</h3>
+ <ul>
+ <a href="../libraries/pl.path.html#splitpath">splitpath</a>
+ </ul>
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example">path.dirname(<span class="string">"/some/path/file.txt"</span>) <span class="comment">-- "/some/path"
+</span>path.dirname(<span class="string">"file.txt"</span>) <span class="comment">-- "" (empty string)</span></pre>
+ </ul>
</dd>
<dt>
@@ -526,9 +693,26 @@
</li>
</ul>
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
+
+
+
+ </ol>
+ <h3>See also:</h3>
+ <ul>
+ <a href="../libraries/pl.path.html#splitpath">splitpath</a>
+ </ul>
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example">path.basename(<span class="string">"/some/path/file.txt"</span>) <span class="comment">-- "file.txt"
+</span>path.basename(<span class="string">"/some/path/file/"</span>) <span class="comment">-- "" (empty string)</span></pre>
+ </ul>
</dd>
<dt>
@@ -547,17 +731,34 @@
</li>
</ul>
+ <h3>Returns:</h3>
+ <ol>
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
+ </ol>
+
+
+ <h3>See also:</h3>
+ <ul>
+ <a href="../libraries/pl.path.html#splitext">splitext</a>
+ </ul>
+
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example">path.extension(<span class="string">"/some/path/file.txt"</span>) <span class="comment">-- ".txt"
+</span>path.extension(<span class="string">"/some/path/file_txt"</span>) <span class="comment">-- "" (empty string)</span></pre>
+ </ul>
+
</dd>
<dt>
<a name = "isabs"></a>
<strong>isabs (P)</strong>
</dt>
<dd>
- is this an absolute path?.
+ is this an absolute path?
<h3>Parameters:</h3>
@@ -571,6 +772,16 @@
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example">path.isabs(<span class="string">"hello/path"</span>) <span class="comment">-- false
+</span>path.isabs(<span class="string">"/hello/path"</span>) <span class="comment">-- true
+</span><span class="comment">-- Windows;
+</span>path.isabs(<span class="string">"hello\path"</span>) <span class="comment">-- false
+</span>path.isabs(<span class="string">"\hello\path"</span>) <span class="comment">-- true
+</span>path.isabs(<span class="string">"C:\hello\path"</span>) <span class="comment">-- true
+</span>path.isabs(<span class="string">"C:hello\path"</span>) <span class="comment">-- false</span></pre>
+ </ul>
</dd>
<dt>
@@ -599,19 +810,37 @@
</li>
</ul>
+ <h3>Returns:</h3>
+ <ol>
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
+ the combined path
+ </ol>
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example">path.join(<span class="string">"/first"</span>,<span class="string">"second"</span>,<span class="string">"third"</span>) <span class="comment">-- "/first/second/third"
+</span>path.join(<span class="string">"first"</span>,<span class="string">"second/third"</span>) <span class="comment">-- "first/second/third"
+</span>path.join(<span class="string">"/first"</span>,<span class="string">"/second"</span>,<span class="string">"third"</span>) <span class="comment">-- "/second/third"</span></pre>
+ </ul>
+
</dd>
<dt>
<a name = "normcase"></a>
<strong>normcase (P)</strong>
</dt>
<dd>
- normalize the case of a pathname. On Unix, this returns the path unchanged;
- for Windows, it converts the path to lowercase, and it also converts forward slashes
- to backward slashes.
+
+<p>normalize the case of a pathname. On Unix, this returns the path unchanged,
+ for Windows it converts;</p>
+
+<ul>
+ <li>the path to lowercase</li>
+ <li>forward slashes to backward slashes</li>
+</ul>
+
<h3>Parameters:</h3>
@@ -625,6 +854,12 @@
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example">path.normcase(<span class="string">"/Some/Path/File.txt"</span>)
+<span class="comment">-- Windows: "\some\path\file.txt"
+</span><span class="comment">-- Others : "/Some/Path/File.txt"</span></pre>
+ </ul>
</dd>
<dt>
@@ -633,7 +868,9 @@
</dt>
<dd>
normalize a path name.
- <code>A//B</code>, <code>A/./B</code>, and <code>A/foo/../B</code> all become <code>A/B</code>.
+ <code>A//B</code>, <code>A/./B</code>, and <code>A/foo/../B</code> all become <code>A/B</code>.</p>
+
+<p> An empty path results in '.'.
<h3>Parameters:</h3>
@@ -704,7 +941,7 @@
</dt>
<dd>
Return a suitable full path to a new temporary file name.
- unlike os.tmpnam(), it always gives you a writeable path (uses TEMP environment variable on Windows)
+ unlike os.tmpname(), it always gives you a writeable path (uses TEMP environment variable on Windows)
@@ -733,6 +970,11 @@
</li>
</ul>
+ <h3>Returns:</h3>
+ <ol>
+
+ the common prefix (Windows: separators will be normalized, casing will be original)
+ </ol>
@@ -761,7 +1003,7 @@
<li>
on success: path of module, lua or binary</li>
<li>
- on error: nil,error string</li>
+ on error: nil, error string listing paths tried</li>
</ol>
@@ -773,77 +1015,6 @@
<dl class="function">
<dt>
- <a name = "dir"></a>
- <strong>dir</strong>
- </dt>
- <dd>
- Lua iterator over the entries of a given directory.
- Behaves like <a href="http://stevedonovan.github.io/lua-stdlibs/modules/lfs.html#dir">lfs.dir</a>
-
-
-
-
-
-
-
-</dd>
- <dt>
- <a name = "mkdir"></a>
- <strong>mkdir</strong>
- </dt>
- <dd>
- Creates a directory.
-
-
-
-
-
-
-
-</dd>
- <dt>
- <a name = "rmdir"></a>
- <strong>rmdir</strong>
- </dt>
- <dd>
- Removes a directory.
-
-
-
-
-
-
-
-</dd>
- <dt>
- <a name = "currentdir"></a>
- <strong>currentdir</strong>
- </dt>
- <dd>
- Get the working directory.
-
-
-
-
-
-
-
-</dd>
- <dt>
- <a name = "chdir"></a>
- <strong>chdir</strong>
- </dt>
- <dd>
- Changes the working directory.
-
-
-
-
-
-
-
-</dd>
- <dt>
<a name = "is_windows"></a>
<strong>is_windows</strong>
</dt>
@@ -892,7 +1063,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.permute.html b/docs/libraries/pl.permute.html
index 9f94df1..6fae70c 100644
--- a/docs/libraries/pl.permute.html
+++ b/docs/libraries/pl.permute.html
@@ -202,7 +202,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.pretty.html b/docs/libraries/pl.pretty.html
index 4bda6d2..ca353e5 100644
--- a/docs/libraries/pl.pretty.html
+++ b/docs/libraries/pl.pretty.html
@@ -121,7 +121,7 @@
<p> Also provides a sandboxed Lua table reader and
a function to present large numbers in human-friendly format.</p>
-<p> Dependencies: <a href="../libraries/pl.utils.html#">pl.utils</a>, <a href="../libraries/pl.lexer.html#">pl.lexer</a>, <a href="../libraries/pl.stringx.html#">pl.stringx</a>, <a href="https://www.lua.org/manual/5.1/manual.html#5.9">debug</a></p>
+<p> Dependencies: <a href="../libraries/pl.utils.html#">pl.utils</a>, <a href="../libraries/pl.lexer.html#">pl.lexer</a>, <a href="../libraries/pl.stringx.html#">pl.stringx</a>, <a href="../libraries/pl.pretty.html#debug">debug</a></p>
<h2><a href="#Functions">Functions</a></h2>
@@ -143,6 +143,10 @@
<td class="summary">Dump a Lua table out to a file or stdout.</td>
</tr>
<tr>
+ <td class="name" nowrap><a href="#debug">debug (...)</a></td>
+ <td class="summary">Dump a series of arguments to stdout for debug purposes.</td>
+ </tr>
+ <tr>
<td class="name" nowrap><a href="#number">number (num[, kind[, prec]])</a></td>
<td class="summary">Format large numbers nicely for human consumption.</td>
</tr>
@@ -235,7 +239,13 @@
This function never fails, but may complain by returning an
extra value. Normally puts out one item per line, using
the provided indent; set the second parameter to an empty string
- if you want output on one line.
+ if you want output on one line.</p>
+
+<p> <em>NOTE:</em> this is NOT a serialization function, not a full blown
+ debug function. Checkout out respectively the
+ <a href="https://github.com/pkulchenko/serpent">serpent</a>
+ or <a href="https://github.com/kikito/inspect.lua">inspect</a>
+ Lua modules for that if you need them.
<h3>Parameters:</h3>
@@ -298,6 +308,54 @@
</dd>
<dt>
+ <a name = "debug"></a>
+ <strong>debug (...)</strong>
+ </dt>
+ <dd>
+ Dump a series of arguments to stdout for debug purposes.
+ This function is attached to the module table <code>__call</code> method, to make it
+ extra easy to access. So the full:</p>
+
+<pre><code> print(require("pl.pretty").write({...}))
+</code></pre>
+
+<p> Can be shortened to:</p>
+
+<pre><code> require"pl.pretty" (...)
+</code></pre>
+
+<p> Any <code>nil</code> entries will be printed as <code>&quot;&lt;nil&gt;&quot;</code> to make them explicit.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">...</span>
+ the parameters to dump to stdout.
+ </li>
+ </ul>
+
+
+
+
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example"><span class="comment">-- example debug output
+</span><span class="global">require</span><span class="string">"pl.pretty"</span> (<span class="string">"hello"</span>, <span class="keyword">nil</span>, <span class="string">"world"</span>, { bye = <span class="string">"world"</span>, <span class="keyword">true</span>} )
+
+<span class="comment">-- output:
+</span>{
+ [<span class="string">"arg 1"</span>] = <span class="string">"hello"</span>,
+ [<span class="string">"arg 2"</span>] = <span class="string">"&lt;nil&gt;"</span>,
+ [<span class="string">"arg 3"</span>] = <span class="string">"world"</span>,
+ [<span class="string">"arg 4"</span>] = {
+ <span class="keyword">true</span>,
+ bye = <span class="string">"world"</span>
+ }
+}</pre>
+ </ul>
+
+</dd>
+ <dt>
<a name = "number"></a>
<strong>number (num[, kind[, prec]])</strong>
</dt>
@@ -337,7 +395,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.seq.html b/docs/libraries/pl.seq.html
index e84507b..4571e69 100644
--- a/docs/libraries/pl.seq.html
+++ b/docs/libraries/pl.seq.html
@@ -881,7 +881,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.sip.html b/docs/libraries/pl.sip.html
index 51b7ca3..0d56269 100644
--- a/docs/libraries/pl.sip.html
+++ b/docs/libraries/pl.sip.html
@@ -392,7 +392,7 @@ q quoted <span class="global">string</span>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.strict.html b/docs/libraries/pl.strict.html
index 2e98f0a..4534a94 100644
--- a/docs/libraries/pl.strict.html
+++ b/docs/libraries/pl.strict.html
@@ -120,7 +120,7 @@
<p>Checks uses of undeclared global variables.</p>
<p> All global variables must be 'declared' through a regular assignment
(even assigning <code>nil</code> will do) in a main chunk before being used
- anywhere or assigned to inside a function. Existing metatables <code>__newindex</code> and <code>__index</code>
+ anywhere or assigned to inside a function. Existing metatables <code>__newindex</code> and <code>__index</code>
metamethods are respected.</p>
<p> You can set any table to have strict behaviour using <a href="../libraries/pl.strict.html#module">strict.module</a>. Creating a new
@@ -134,7 +134,7 @@
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
- <td class="name" nowrap><a href="#module">module (name[, mod[, predeclared]])</a></td>
+ <td class="name" nowrap><a href="#module">module ([name[, mod[, predeclared]]])</a></td>
<td class="summary">make an existing table strict.</td>
</tr>
<tr>
@@ -156,7 +156,7 @@
<dl class="function">
<dt>
<a name = "module"></a>
- <strong>module (name[, mod[, predeclared]])</strong>
+ <strong>module ([name[, mod[, predeclared]]])</strong>
</dt>
<dd>
make an existing table strict.
@@ -166,11 +166,12 @@
<ul>
<li><span class="parameter">name</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
- name of table (optional)
+ name of table
+ (<em>optional</em>)
</li>
<li><span class="parameter">mod</span>
<span class="types"><span class="type">tab</span></span>
- table - if <code>nil</code> then we'll return a new table
+ the table to protect - if <code>nil</code> then we'll return a new table
(<em>optional</em>)
</li>
<li><span class="parameter">predeclared</span>
@@ -192,6 +193,19 @@
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example"><span class="keyword">local</span> M = { hello = <span class="string">"world"</span> }
+strict.<span class="global">module</span> (<span class="string">"Awesome_Module"</span>, M, {
+ Lua = <span class="keyword">true</span>, <span class="comment">-- defines allowed keys
+</span>})
+
+<span class="global">assert</span>(M.hello == <span class="string">"world"</span>)
+<span class="global">assert</span>(M.Lua == <span class="keyword">nil</span>) <span class="comment">-- access allowed, but has no value yet
+</span>M.Lua = <span class="string">"Rocks"</span>
+<span class="global">assert</span>(M.Lua == <span class="string">"Rocks"</span>)
+M.not_allowed = <span class="string">"bad boy"</span> <span class="comment">-- throws an error</span></pre>
+ </ul>
</dd>
<dt>
@@ -208,9 +222,7 @@
<ul>
<li><span class="parameter">T</span>
<span class="types"><span class="type">tab</span></span>
-
-
-
+ the table containing the tables to protect. Table <code>T</code> itself will NOT be protected.
</li>
</ul>
@@ -230,14 +242,12 @@
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">mod</span>
-
-
-
+ <span class="types"><span class="type">tab</span></span>
+ module table
</li>
<li><span class="parameter">name</span>
-
-
-
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
+ module name
</li>
</ul>
@@ -253,7 +263,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.stringio.html b/docs/libraries/pl.stringio.html
index 6fc3658..a0f6335 100644
--- a/docs/libraries/pl.stringio.html
+++ b/docs/libraries/pl.stringio.html
@@ -208,7 +208,7 @@ f:write(<span class="string">'dolly'</span>)
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.stringx.html b/docs/libraries/pl.stringx.html
index cedce66..e2d2838 100644
--- a/docs/libraries/pl.stringx.html
+++ b/docs/libraries/pl.stringx.html
@@ -201,7 +201,7 @@
<td class="summary">replace up to n instances of old by new in the string s.</td>
</tr>
<tr>
- <td class="name" nowrap><a href="#count">count (s, sub)</a></td>
+ <td class="name" nowrap><a href="#count">count (s, sub[, allow_overlap])</a></td>
<td class="summary">count all instances of substring in string.</td>
</tr>
</table>
@@ -259,7 +259,7 @@
</tr>
<tr>
<td class="name" nowrap><a href="#title">title (s)</a></td>
- <td class="summary">iniital word letters uppercase ('title case').</td>
+ <td class="summary">inital word letters uppercase ('title case').</td>
</tr>
<tr>
<td class="name" nowrap><a href="#shorten">shorten (s, w, tail)</a></td>
@@ -462,6 +462,7 @@
</dt>
<dd>
concatenate the strings using this string as a delimiter.
+ Note that the arguments are reversed from <code>string.concat</code>.
<h3>Parameters:</h3>
@@ -480,7 +481,7 @@
<h3>Usage:</h3>
<ul>
- <pre class="example">(<span class="string">' '</span>):join {<span class="number">1</span>,<span class="number">2</span>,<span class="number">3</span>} == <span class="string">'1 2 3'</span></pre>
+ <pre class="example">stringx.join(<span class="string">' '</span>, {<span class="number">1</span>,<span class="number">2</span>,<span class="number">3</span>}) == <span class="string">'1 2 3'</span></pre>
</ul>
</dd>
@@ -509,6 +510,11 @@
</li>
</ul>
+ <h3>Returns:</h3>
+ <ol>
+
+ List of lines
+ </ol>
@@ -540,14 +546,19 @@
</li>
</ul>
+ <h3>Returns:</h3>
+ <ol>
+
+ List
+ </ol>
<h3>Usage:</h3>
<ul>
- <li><pre class="example">#((<span class="string">'one two'</span>):split()) == <span class="number">2</span></pre></li>
- <li><pre class="example">(<span class="string">'one,two,three'</span>):split(<span class="string">','</span>) == List{<span class="string">'one'</span>,<span class="string">'two'</span>,<span class="string">'three'</span>}</pre></li>
- <li><pre class="example">(<span class="string">'one,two,three'</span>):split(<span class="string">','</span>,<span class="number">2</span>) == List{<span class="string">'one'</span>,<span class="string">'two,three'</span>}</pre></li>
+ <li><pre class="example">#(stringx.split(<span class="string">'one two'</span>)) == <span class="number">2</span></pre></li>
+ <li><pre class="example">stringx.split(<span class="string">'one,two,three'</span>, <span class="string">','</span>) == List{<span class="string">'one'</span>,<span class="string">'two'</span>,<span class="string">'three'</span>}</pre></li>
+ <li><pre class="example">stringx.split(<span class="string">'one,two,three'</span>, <span class="string">','</span>, <span class="number">2</span>) == List{<span class="string">'one'</span>,<span class="string">'two,three'</span>}</pre></li>
</ul>
</dd>
@@ -557,8 +568,7 @@
</dt>
<dd>
replace all tabs in s with tabsize spaces. If not specified, tabsize defaults to 8.
- with 0.9.5 this now correctly expands to the next tab stop (if you really
- want to just replace tabs, use :gsub('\t',' ') etc)
+ Tab stops will be honored.
<h3>Parameters:</h3>
@@ -573,9 +583,19 @@
</li>
</ul>
+ <h3>Returns:</h3>
+ <ol>
+
+ expanded string
+ </ol>
+ <h3>Usage:</h3>
+ <ul>
+ <li><pre class="example">stringx.expandtabs(<span class="string">'\tone,two,three'</span>, <span class="number">4</span>) == <span class="string">' one,two,three'</span></pre></li>
+ <li><pre class="example">stringx.expandtabs(<span class="string">' \tone,two,three'</span>, <span class="number">4</span>) == <span class="string">' one,two,three'</span></pre></li>
+ </ul>
</dd>
</dl>
@@ -612,6 +632,11 @@
</li>
</ul>
+ <h3>Returns:</h3>
+ <ol>
+
+ start index, or nil if not found
+ </ol>
@@ -647,6 +672,11 @@
</li>
</ul>
+ <h3>Returns:</h3>
+ <ol>
+
+ start index, or nil if not found
+ </ol>
@@ -658,7 +688,7 @@
</dt>
<dd>
replace up to n instances of old by new in the string s.
- if n is not present, replace all instances.
+ If n is not present, replace all instances.
<h3>Parameters:</h3>
@@ -694,7 +724,7 @@
</dd>
<dt>
<a name = "count"></a>
- <strong>count (s, sub)</strong>
+ <strong>count (s, sub[, allow_overlap])</strong>
</dt>
<dd>
count all instances of substring in string.
@@ -710,11 +740,21 @@
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
substring
</li>
+ <li><span class="parameter">allow_overlap</span>
+ <span class="types"><span class="type">bool</span></span>
+ allow matches to overlap
+ (<em>optional</em>)
+ </li>
</ul>
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example"><span class="global">assert</span>(stringx.count(<span class="string">'banana'</span>, <span class="string">'ana'</span>) == <span class="number">1</span>)
+<span class="global">assert</span>(stringx.count(<span class="string">'banana'</span>, <span class="string">'ana'</span>, <span class="keyword">true</span>) == <span class="number">2</span>)</pre>
+ </ul>
</dd>
</dl>
@@ -749,6 +789,10 @@
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example">stringx.ljust(<span class="string">'hello'</span>, <span class="number">10</span>, <span class="string">'*'</span>) == <span class="string">'*****hello'</span></pre>
+ </ul>
</dd>
<dt>
@@ -779,6 +823,10 @@
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example">stringx.rjust(<span class="string">'hello'</span>, <span class="number">10</span>, <span class="string">'*'</span>) == <span class="string">'hello*****'</span></pre>
+ </ul>
</dd>
<dt>
@@ -809,6 +857,10 @@
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example">stringx.center(<span class="string">'hello'</span>, <span class="number">10</span>, <span class="string">'*'</span>) == <span class="string">'**hello***'</span></pre>
+ </ul>
</dd>
<dt>
@@ -924,6 +976,10 @@
</ol>
+ <h3>See also:</h3>
+ <ul>
+ <a href="../libraries/pl.utils.html#splitv">utils.splitv</a>
+ </ul>
<h3>Usage:</h3>
<ul>
@@ -963,6 +1019,11 @@
+ <h3>Usage:</h3>
+ <ul>
+ <li><pre class="example">{stringx.partition(<span class="string">'a,b,c'</span>, <span class="string">','</span>))} == {<span class="string">'a'</span>, <span class="string">','</span>, <span class="string">'b,c'</span>}</pre></li>
+ <li><pre class="example">{stringx.partition(<span class="string">'abc'</span>, <span class="string">'x'</span>))} == {<span class="string">'abc'</span>, <span class="string">''</span>, <span class="string">''</span>}</pre></li>
+ </ul>
</dd>
<dt>
@@ -997,6 +1058,11 @@
+ <h3>Usage:</h3>
+ <ul>
+ <li><pre class="example">{stringx.rpartition(<span class="string">'a,b,c'</span>, <span class="string">','</span>))} == {<span class="string">'a,b'</span>, <span class="string">','</span>, <span class="string">'c'</span>}</pre></li>
+ <li><pre class="example">{stringx.rpartition(<span class="string">'abc'</span>, <span class="string">'x'</span>))} == {<span class="string">''</span>, <span class="string">''</span>, <span class="string">'abc'</span>}</pre></li>
+ </ul>
</dd>
<dt>
@@ -1057,6 +1123,14 @@
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example"><span class="keyword">local</span> line_no = <span class="number">1</span>
+<span class="keyword">for</span> line <span class="keyword">in</span> stringx.lines(some_text) <span class="keyword">do</span>
+ <span class="global">print</span>(line_no, line)
+ line_no = line_no + <span class="number">1</span>
+<span class="keyword">end</span></pre>
+ </ul>
</dd>
<dt>
@@ -1064,7 +1138,7 @@
<strong>title (s)</strong>
</dt>
<dd>
- iniital word letters uppercase ('title case').
+ inital word letters uppercase ('title case').
Here 'words' mean chunks of non-space characters.
@@ -1084,6 +1158,10 @@
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example">stringx.title(<span class="string">"hello world"</span>) == <span class="string">"Hello World"</span>)</pre>
+ </ul>
</dd>
<dt>
@@ -1154,7 +1232,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.tablex.html b/docs/libraries/pl.tablex.html
index 18c4513..d932cf3 100644
--- a/docs/libraries/pl.tablex.html
+++ b/docs/libraries/pl.tablex.html
@@ -433,12 +433,16 @@
a table
</li>
<li><span class="parameter">...</span>
- extra arguments
+ extra arguments passed to <code>fun</code>
</li>
</ul>
+ <h3>See also:</h3>
+ <ul>
+ <a href="../libraries/pl.tablex.html#foreach">tablex.foreach</a>
+ </ul>
</dd>
@@ -804,7 +808,10 @@
<dd>
modifies a table to be read only.
This only offers weak protection. Tables can still be modified with
- <a href="https://www.lua.org/manual/5.1/manual.html#pdf-table.insert">table.insert</a> and <a href="https://www.lua.org/manual/5.1/manual.html#pdf-rawset">rawset</a>.
+ <a href="https://www.lua.org/manual/5.1/manual.html#pdf-table.insert">table.insert</a> and <a href="https://www.lua.org/manual/5.1/manual.html#pdf-rawset">rawset</a>.</p>
+
+<p> <em>NOTE</em>: for Lua 5.1 length, pairs and ipairs will not work, since the
+ equivalent metamethods are only available in Lua 5.2 and newer.
<h3>Parameters:</h3>
@@ -818,7 +825,7 @@
<h3>Returns:</h3>
<ol>
- the table read only.
+ the table read only (a proxy).
</ol>
@@ -1090,13 +1097,26 @@
</li>
<li><span class="parameter">cmp</span>
<span class="types"><span class="type">func</span></span>
- A comparison function
+ A comparison function; <code>bool = cmp(t1_value, t2_value)</code>
</li>
</ul>
+ <h3>Returns:</h3>
+ <ol>
+
+ true or false
+ </ol>
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example"><span class="global">assert</span>(tablex.compare({ <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span> }, { <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span> }, <span class="string">"=="</span>))
+
+<span class="global">assert</span>(tablex.compare(
+ {<span class="number">1</span>,<span class="number">2</span>,<span class="number">3</span>, hello = <span class="string">"world"</span>}, <span class="comment">-- fields are not compared!
+</span> {<span class="number">1</span>,<span class="number">2</span>,<span class="number">3</span>}, <span class="keyword">function</span>(v1, v2) <span class="keyword">return</span> v1 == v2 <span class="keyword">end</span>)</pre>
+ </ul>
</dd>
<dt>
@@ -1191,7 +1211,7 @@
A value
</li>
<li><span class="parameter">idx</span>
- index to start; -1 means last element,etc (default 1)
+ index to start; -1 means last element,etc (default <code>#t</code>)
</li>
</ul>
@@ -1214,7 +1234,12 @@
<strong>find_if (t, cmp, arg)</strong>
</dt>
<dd>
- return the index (or key) of a value in a table using a comparison function.
+ return the index (or key) of a value in a table using a comparison function. </p>
+
+<p> <em>NOTE</em>: the 2nd return value of this function, the value returned
+ by the comparison function, has a limitation that it cannot be <code>false</code>.
+ Because if it is, then it indicates the comparison failed, and the
+ function will continue the search. See examples.
<h3>Parameters:</h3>
@@ -1237,11 +1262,34 @@
<li>
index of value, or nil if not found</li>
<li>
- value returned by comparison function</li>
+ value returned by comparison function (cannot be <code>false</code>!)</li>
</ol>
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example"><span class="comment">-- using an operator
+</span><span class="keyword">local</span> lst = { <span class="string">"Rudolph"</span>, <span class="keyword">true</span>, <span class="keyword">false</span>, <span class="number">15</span> }
+<span class="keyword">local</span> idx, cmp_result = tablex.rfind(lst, <span class="string">"=="</span>, <span class="string">"Rudolph"</span>)
+<span class="global">assert</span>(idx == <span class="number">1</span>)
+<span class="global">assert</span>(cmp_result == <span class="keyword">true</span>)
+
+<span class="keyword">local</span> idx, cmp_result = tablex.rfind(lst, <span class="string">"=="</span>, <span class="keyword">false</span>)
+<span class="global">assert</span>(idx == <span class="number">3</span>)
+<span class="global">assert</span>(cmp_result == <span class="keyword">true</span>) <span class="comment">-- looking up 'false' works!
+</span>
+<span class="comment">-- using a function returning the value looked up
+</span><span class="keyword">local</span> cmp = <span class="keyword">function</span>(v1, v2) <span class="keyword">return</span> v1 == v2 <span class="keyword">and</span> v2 <span class="keyword">end</span>
+<span class="keyword">local</span> idx, cmp_result = tablex.rfind(lst, cmp, <span class="string">"Rudolph"</span>)
+<span class="global">assert</span>(idx == <span class="number">1</span>)
+<span class="global">assert</span>(cmp_result == <span class="string">"Rudolph"</span>) <span class="comment">-- the value is returned
+</span>
+<span class="comment">-- NOTE: this fails, since 'false' cannot be returned!
+</span><span class="keyword">local</span> idx, cmp_result = tablex.rfind(lst, cmp, <span class="keyword">false</span>)
+<span class="global">assert</span>(idx == <span class="keyword">nil</span>) <span class="comment">-- looking up 'false' failed!
+</span><span class="global">assert</span>(cmp_result == <span class="keyword">nil</span>)</pre>
+ </ul>
</dd>
<dt>
@@ -1382,9 +1430,37 @@
</li>
</ul>
+ <h3>Returns:</h3>
+ <ol>
+
+ a <a href="../classes/pl.List.html">List</a> with the results of the method (1st result only)
+ </ol>
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example"><span class="keyword">local</span> Car = {}
+Car.__index = Car
+<span class="keyword">function</span> Car.new(car)
+ <span class="keyword">return</span> <span class="global">setmetatable</span>(car <span class="keyword">or</span> {}, Car)
+<span class="keyword">end</span>
+Car.speed = <span class="number">0</span>
+<span class="keyword">function</span> Car:faster(increase)
+ self.speed = self.speed + increase
+ <span class="keyword">return</span> self.speed
+<span class="keyword">end</span>
+
+<span class="keyword">local</span> ferrari = Car.new{ name = <span class="string">"Ferrari"</span> }
+<span class="keyword">local</span> lamborghini = Car.new{ name = <span class="string">"Lamborghini"</span>, speed = <span class="number">50</span> }
+<span class="keyword">local</span> cars = { ferrari, lamborghini }
+
+<span class="global">assert</span>(ferrari.speed == <span class="number">0</span>)
+<span class="global">assert</span>(lamborghini.speed == <span class="number">50</span>)
+tablex.map_named_method(<span class="string">"faster"</span>, cars, <span class="number">10</span>)
+<span class="global">assert</span>(ferrari.speed == <span class="number">10</span>)
+<span class="global">assert</span>(lamborghini.speed == <span class="number">60</span>)</pre>
+ </ul>
</dd>
<dt>
@@ -1587,15 +1663,19 @@
</li>
<li><span class="parameter">fun</span>
<span class="types"><span class="type">func</span></span>
- a function with at least one argument
+ a function on the elements; <code>function(value, key, ...)</code>
</li>
<li><span class="parameter">...</span>
- extra arguments
+ extra arguments passed to <code>fun</code>
</li>
</ul>
+ <h3>See also:</h3>
+ <ul>
+ <a href="../libraries/pl.tablex.html#transform">tablex.transform</a>
+ </ul>
</dd>
@@ -1893,7 +1973,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.template.html b/docs/libraries/pl.template.html
index e0655b6..06ff25c 100644
--- a/docs/libraries/pl.template.html
+++ b/docs/libraries/pl.template.html
@@ -329,7 +329,7 @@ static int l_${n} (luaState *state);
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.test.html b/docs/libraries/pl.test.html
index 6059a2c..00aaadb 100644
--- a/docs/libraries/pl.test.html
+++ b/docs/libraries/pl.test.html
@@ -438,7 +438,7 @@ test.asserteq({<span class="number">1</span>,<span class="number">2</span>},{<sp
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.text.html b/docs/libraries/pl.text.html
index 19241f3..7368569 100644
--- a/docs/libraries/pl.text.html
+++ b/docs/libraries/pl.text.html
@@ -374,7 +374,7 @@ dog = Pluto
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.types.html b/docs/libraries/pl.types.html
index 6bc1ad1..16f7132 100644
--- a/docs/libraries/pl.types.html
+++ b/docs/libraries/pl.types.html
@@ -468,7 +468,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.url.html b/docs/libraries/pl.url.html
index 9245b90..c6861cb 100644
--- a/docs/libraries/pl.url.html
+++ b/docs/libraries/pl.url.html
@@ -205,7 +205,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.utils.html b/docs/libraries/pl.utils.html
index 51b5cba..bc0a5a9 100644
--- a/docs/libraries/pl.utils.html
+++ b/docs/libraries/pl.utils.html
@@ -1260,7 +1260,7 @@ string_lambda <span class="string">'_+1'</span> (<span class="number">2</span>)
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/libraries/pl.xml.html b/docs/libraries/pl.xml.html
index 693a86c..4778a85 100644
--- a/docs/libraries/pl.xml.html
+++ b/docs/libraries/pl.xml.html
@@ -828,7 +828,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/manual/01-introduction.md.html b/docs/manual/01-introduction.md.html
index d88a25e..865799e 100644
--- a/docs/manual/01-introduction.md.html
+++ b/docs/manual/01-introduction.md.html
@@ -836,7 +836,7 @@ again comes with run-time costs.</p>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/manual/02-arrays.md.html b/docs/manual/02-arrays.md.html
index 7f32276..de25844 100644
--- a/docs/manual/02-arrays.md.html
+++ b/docs/manual/02-arrays.md.html
@@ -907,7 +907,7 @@ methods.</p>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/manual/03-strings.md.html b/docs/manual/03-strings.md.html
index 5d04f09..908e722 100644
--- a/docs/manual/03-strings.md.html
+++ b/docs/manual/03-strings.md.html
@@ -390,7 +390,7 @@ builder' pattern is useful for efficiently creating large strings.</p>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/manual/04-paths.md.html b/docs/manual/04-paths.md.html
index 4bdbffd..70a7cbc 100644
--- a/docs/manual/04-paths.md.html
+++ b/docs/manual/04-paths.md.html
@@ -322,7 +322,7 @@ do the job:</p>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/manual/05-dates.md.html b/docs/manual/05-dates.md.html
index d18e478..07c0b77 100644
--- a/docs/manual/05-dates.md.html
+++ b/docs/manual/05-dates.md.html
@@ -260,7 +260,7 @@ exactly what the expected format is, so there is an explicit flag:</p>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/manual/06-data.md.html b/docs/manual/06-data.md.html
index 523c48b..98a49bc 100644
--- a/docs/manual/06-data.md.html
+++ b/docs/manual/06-data.md.html
@@ -934,15 +934,11 @@ format which it was my task to maintain:</p>
<pre>
points
-</pre>
-
-<p>(818344.1,-20389.7,-0.1),(818337.9,-20389.3,-0.1),(818332.5,-20387.8,-0.1)</p>
-
-<pre>
-,(<span class="number">818327.4</span>,-<span class="number">20388</span>,-<span class="number">0.1</span>),(<span class="number">818322</span>,-<span class="number">20387.7</span>,-<span class="number">0.1</span>),(<span class="number">818316.3</span>,-<span class="number">20388.6</span>,-<span class="number">0.1</span>)
-,(<span class="number">818309.7</span>,-<span class="number">20389.4</span>,-<span class="number">0.1</span>),(<span class="number">818303.5</span>,-<span class="number">20390.6</span>,-<span class="number">0.1</span>),(<span class="number">818295.8</span>,-<span class="number">20388.3</span>,-<span class="number">0.1</span>)
-,(<span class="number">818290.5</span>,-<span class="number">20386.9</span>,-<span class="number">0.1</span>),(<span class="number">818285.2</span>,-<span class="number">20386.1</span>,-<span class="number">0.1</span>),(<span class="number">818279.3</span>,-<span class="number">20383.6</span>,-<span class="number">0.1</span>)
-,(<span class="number">818274</span>,-<span class="number">20381.2</span>,-<span class="number">0.1</span>),(<span class="number">818274</span>,-<span class="number">20380.7</span>,-<span class="number">0.1</span>);
+ (<span class="number">818344.1</span>,-<span class="number">20389.7</span>,-<span class="number">0.1</span>),(<span class="number">818337.9</span>,-<span class="number">20389.3</span>,-<span class="number">0.1</span>),(<span class="number">818332.5</span>,-<span class="number">20387.8</span>,-<span class="number">0.1</span>)
+ ,(<span class="number">818327.4</span>,-<span class="number">20388</span>,-<span class="number">0.1</span>),(<span class="number">818322</span>,-<span class="number">20387.7</span>,-<span class="number">0.1</span>),(<span class="number">818316.3</span>,-<span class="number">20388.6</span>,-<span class="number">0.1</span>)
+ ,(<span class="number">818309.7</span>,-<span class="number">20389.4</span>,-<span class="number">0.1</span>),(<span class="number">818303.5</span>,-<span class="number">20390.6</span>,-<span class="number">0.1</span>),(<span class="number">818295.8</span>,-<span class="number">20388.3</span>,-<span class="number">0.1</span>)
+ ,(<span class="number">818290.5</span>,-<span class="number">20386.9</span>,-<span class="number">0.1</span>),(<span class="number">818285.2</span>,-<span class="number">20386.1</span>,-<span class="number">0.1</span>),(<span class="number">818279.3</span>,-<span class="number">20383.6</span>,-<span class="number">0.1</span>)
+ ,(<span class="number">818274</span>,-<span class="number">20381.2</span>,-<span class="number">0.1</span>),(<span class="number">818274</span>,-<span class="number">20380.7</span>,-<span class="number">0.1</span>);
</pre>
<p>Here is code to extract the points using <a href="../libraries/pl.lexer.html#">pl.lexer</a>:</p>
@@ -1630,7 +1626,7 @@ this is not the tool for you!</p>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/manual/07-functional.md.html b/docs/manual/07-functional.md.html
index 565848b..56c15fc 100644
--- a/docs/manual/07-functional.md.html
+++ b/docs/manual/07-functional.md.html
@@ -827,7 +827,7 @@ this;</p>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/manual/08-additional.md.html b/docs/manual/08-additional.md.html
index 3b876c5..d713e8f 100644
--- a/docs/manual/08-additional.md.html
+++ b/docs/manual/08-additional.md.html
@@ -808,7 +808,7 @@ test.asserteq(T(failing()),T(<span class="keyword">nil</span>,<span class="strin
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/docs/manual/09-discussion.md.html b/docs/manual/09-discussion.md.html
index 667e25c..1b70470 100644
--- a/docs/manual/09-discussion.md.html
+++ b/docs/manual/09-discussion.md.html
@@ -226,7 +226,7 @@ cached in as efficient way as possible.</p>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
-<i style="float:right;">Last updated 2019-10-14 15:29:36 </i>
+<i style="float:right;">Last updated 2020-08-05 10:30:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
diff --git a/penlight-1.8.0-1.src.rock b/penlight-1.8.0-1.src.rock
new file mode 100644
index 0000000..6265b3d
--- /dev/null
+++ b/penlight-1.8.0-1.src.rock
Binary files differ