changeset 1816:e62c88b2883b

docs work
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 11 Jun 2024 21:39:18 -0600
parents 3dabc11da660
children 969ced346cef
files website/src/manual.html.luan
diffstat 1 files changed, 60 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
diff -r 3dabc11da660 -r e62c88b2883b website/src/manual.html.luan
--- a/website/src/manual.html.luan	Tue Jun 11 17:34:27 2024 -0600
+++ b/website/src/manual.html.luan	Tue Jun 11 21:39:18 2024 -0600
@@ -418,7 +418,7 @@
 
 <li><p>
 <b>"gc":</b>
-This is when a table is garbage collected.  When the table's <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html#finalize()">finalize</a> method is called by the Java garbage collector, if there is a "<code>__gc</code>" metamethod then it is called with the table as a parameter.
+This is when a table is garbage collected.  When the table's <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--">finalize</a> method is called by the Java garbage collector, if there is a "<code>__gc</code>" metamethod then it is called with the table as a parameter.
 </p></li>
 
 </ul>
@@ -1311,7 +1311,7 @@
 </ul>
 
 <p>
-Addition, subtraction, multiplication, division, and unary minus are the same as these operators in Java.  Exponentiation uses Java's <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Math.html#pow(double,%20double)">Math.pow</a> function.
+Addition, subtraction, multiplication, division, and unary minus are the same as these operators in Java.  Exponentiation uses Java's <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#pow-double-double-">Math.pow</a> function.
 </p>
 
 <p>
@@ -1384,7 +1384,7 @@
 </p>
 
 <p>
-Java values are compared for equality with the Java <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html#equals(java.lang.Object)"><code>equals</code></a> method.
+Java values are compared for equality with the Java <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-"><code>equals</code></a> method.
 </p>
 
 <p>
@@ -2544,6 +2544,20 @@
 <%
 						end
 					}
+					["String.digest_message"] = {
+						title = "String.digest_message (algorithm, s)"
+						content = function()
+%>
+<p>Returns a hex digest string of <code>s</code>.  Could be defined as:</p>
+
+<code block>
+function String.digest_message(algorithm,s)
+	return <a href="http://localhost:8080/manual.html#Binary.to_hex">Binary.to_hex</a>( <a href="http://localhost:8080/manual.html#Binary.digest_message">Binary.digest_message</a>( algorithm, <a href="http://localhost:8080/manual.html#String.to_binary">String.to_binary(s)</a> ) )
+end
+</code>
+<%
+						end
+					}
 					["String.encode"] = {
 						title = "String.encode (s)"
 						content = function()
@@ -2595,7 +2609,7 @@
 <p>
 Returns a formatted version of its variable number of arguments
 following the description given in its first argument (which must be a string).
-The format string follows the same rules as the Java function <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#format(java.lang.String,%20java.lang.Object...)"><code>String.format</code></a> because Luan calls this internally.
+The format string follows the same rules as the Java function <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#format-java.lang.String-java.lang.Object...-"><code>String.format</code></a> because Luan calls this internally.
 </p>
 
 <p>
@@ -2631,7 +2645,7 @@
 						content = function()
 %>
 <p>
-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>.
+Returns a string which matches the literal string <code>s</code> in a regular expression.  This function is simply the Java method <a href="https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html#quote-java.lang.String-"><code>Pattern.quote</code></a>.
 </p>
 <%
 						end
@@ -2725,7 +2739,7 @@
 						content = function()
 %>
 <p>
-Converts a string to a binary by calling the Java method <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#getBytes()"><code>String.getBytes</code></a>.
+Converts a string to a binary by calling the Java method <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#getBytes--"><code>String.getBytes</code></a>.
 </p>
 <%
 						end
@@ -2762,7 +2776,7 @@
 						content = function()
 %>
 <p>
-Removes the leading and trailing whitespace by calling the Java method <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#trim()"><code>String.trim</code></a>.
+Removes the leading and trailing whitespace by calling the Java method <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#trim--"><code>String.trim</code></a>.
 </p>
 <%
 						end
@@ -2806,7 +2820,7 @@
 </p>
 
 <p>
-Pattern matching is based on the Java <a href="http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html">Pattern</a> class.
+Pattern matching is based on the Java <a href="https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html">Pattern</a> class.
 </p>
 <%
 				end
@@ -3030,6 +3044,22 @@
 <%
 				end
 				subs = {
+					["Binary.base64_decode"] = {
+						title = "Binary.base64_decode (s)"
+						content = function()
+%>
+<p>Same as Java's <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Base64.Decoder.html#decode-java.lang.String-">Base64.Decoder.decode</a>.</p>
+<%
+						end
+					}
+					["Binary.base64_encode"] = {
+						title = "Binary.base64_encode (b)"
+						content = function()
+%>
+<p>Same as Java's <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Base64.Encoder.html#encodeToString-byte:A-">Base64.Encoder.encodeToString</a>.</p>
+<%
+						end
+					}
 					["Binary.binary"] = {
 						title = "Binary.binary (&middot;&middot;&middot;)"
 						content = function()
@@ -3058,12 +3088,32 @@
 <%
 						end
 					}
+					["Binary.digest_message"] = {
+						title = "Binary.digest_message (algorithm, b)"
+						content = function()
+%>
+<p>Implemented in Java as:</p>
+
+<code block>
+return <a href="https://docs.oracle.com/javase/8/docs/api/java/security/MessageDigest.html">MessageDigest</a>.<a href="https://docs.oracle.com/javase/8/docs/api/java/security/MessageDigest.html#getInstance-java.lang.String-">getInstance</a>(algorithm).<a href="https://docs.oracle.com/javase/8/docs/api/java/security/MessageDigest.html#digest-byte:A-">digest</a>(b);
+</code>
+<%
+						end
+					}
+					["Binary.to_hex"] = {
+						title = "Binary.to_hex (b)"
+						content = function()
+%>
+<p>Converts a binary to a hex string.</p>
+<%
+						end
+					}
 					["Binary.to_string"] = {
 						title = "Binary.to_string (b [,charset])"
 						content = function()
 %>
 <p>
-If <code>charset</code> is not nil then converts the binary <code>b</code> to a string using the Java <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#String(byte[],%20java.lang.String)">String constructor</a>, else makes each byte a char.
+If <code>charset</code> is not nil then converts the binary <code>b</code> to a string using the Java <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#String-byte:A-java.lang.String-">String constructor</a>, else makes each byte a char.
 </p>
 <%
 						end
@@ -3294,7 +3344,7 @@
 						content = function()
 %>
 <p>
-Converts long value <code>i</code> to a string by calling <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Long.html#toString(long,%20int)">Long.toString</a></code>.
+Converts long value <code>i</code> to a string by calling <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html#toString-long-int-">Long.toString</a></code>.
 </p>
 <%
 						end