Sfoglia il codice sorgente

Merge pull request #9936 from JamesDeFabia/17549EncodeBase64

HPCC-17549 Document EncodeBase64 & DecodeBase64

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 anni fa
parent
commit
84ec79b935

+ 49 - 0
docs/ECLStandardLibraryReference/SLR-Mods/DecodeBase64.xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="DecodeBase64">
+  <title>DecodeBase64</title>
+
+  <para><emphasis role="bold">STD.Str.DecodeBase64<indexterm>
+      <primary>STD.Str.DecodeBase64</primary>
+    </indexterm><indexterm>
+      <primary>Str.DecodeBase64</primary>
+    </indexterm><indexterm>
+      <primary>DecodeBase64</primary>
+    </indexterm>(</emphasis> <emphasis>value</emphasis> <emphasis
+  role="bold">)</emphasis> <emphasis role="bold"></emphasis></para>
+
+  <informaltable colsep="1" frame="all" rowsep="1">
+    <tgroup cols="2">
+      <colspec colwidth="80.50pt" />
+
+      <colspec />
+
+      <tbody>
+        <row>
+          <entry><emphasis>value</emphasis></entry>
+
+          <entry>A STRING value containing the data to decode.</entry>
+        </row>
+
+        <row>
+          <entry>Return:<emphasis> </emphasis></entry>
+
+          <entry>DecodeBase64 returns a DATA value.</entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <para>The <emphasis role="bold">DecodeBase64 </emphasis>function returns a
+  DATA value containing the decoded binary data.</para>
+
+  <para>Example:</para>
+
+  <programlisting format="linespecific">IMPORT STD;
+str:='AQIDBAU=';
+DecodedData:= STD.Str.DecodeBase64(str);
+DecodedData;</programlisting>
+
+  <para>See Also: <link linkend="EncodeBase64">EncodeBase64</link></para>
+</sect1>

+ 49 - 0
docs/ECLStandardLibraryReference/SLR-Mods/EncodeBase64.xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="EncodeBase64">
+  <title>EncodeBase64</title>
+
+  <para><emphasis role="bold">STD.Str.EncodeBase64<indexterm>
+      <primary>STD.Str.EncodeBase64</primary>
+    </indexterm><indexterm>
+      <primary>Str.EncodeBase64</primary>
+    </indexterm><indexterm>
+      <primary>EncodeBase64</primary>
+    </indexterm>(</emphasis> <emphasis>value</emphasis> <emphasis
+  role="bold">)</emphasis> <emphasis role="bold"></emphasis></para>
+
+  <informaltable colsep="1" frame="all" rowsep="1">
+    <tgroup cols="2">
+      <colspec colwidth="80.50pt" />
+
+      <colspec />
+
+      <tbody>
+        <row>
+          <entry><emphasis>value</emphasis></entry>
+
+          <entry>A DATA value containing the data to encode.</entry>
+        </row>
+
+        <row>
+          <entry>Return:<emphasis> </emphasis></entry>
+
+          <entry>EncodeBase64 returns a STRING value.</entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <para>The <emphasis role="bold">EncodeBase64 </emphasis>function returns a
+  STRING containing the binary data encoded in Base64.</para>
+
+  <para>Example:</para>
+
+  <programlisting format="linespecific">IMPORT STD;
+dat:=X'0102030405';
+EncodedStr:= STD.Str.EncodeBase64(dat);
+EncodedStr;</programlisting>
+
+  <para>See Also: <link linkend="DecodeBase64">DecodeBase64</link></para>
+</sect1>

+ 7 - 1
docs/ECLStandardLibraryReference/SLR-includer.xml

@@ -249,12 +249,18 @@
     <xi:include href="ECLStandardLibraryReference/SLR-Mods/CountWords.xml"
                 xmlns:xi="http://www.w3.org/2001/XInclude" />
 
+    <xi:include href="ECLStandardLibraryReference/SLR-Mods/DecodeBase64.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude" />
+
     <xi:include href="ECLStandardLibraryReference/SLR-Mods/EditDistance.xml"
                 xmlns:xi="http://www.w3.org/2001/XInclude" />
 
     <xi:include href="ECLStandardLibraryReference/SLR-Mods/EditDistanceWithinRadius.xml"
                 xmlns:xi="http://www.w3.org/2001/XInclude" />
-
+    
+    <xi:include href="ECLStandardLibraryReference/SLR-Mods/EncodeBase64.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude" />
+    
     <xi:include href="ECLStandardLibraryReference/SLR-Mods/EndsWith.xml"
                 xmlns:xi="http://www.w3.org/2001/XInclude" />