Просмотр исходного кода

HPCC-10332 Document ToHexPairs & FromHexPairs

Signed-off-by: Jim DeFabia <jamesdefabia@lexisnexis.com>
Jim DeFabia 11 лет назад
Родитель
Сommit
27edb6a2c8

+ 47 - 0
docs/ECLStandardLibraryReference/SLR-Mods/FromHexPairs.xml

@@ -0,0 +1,47 @@
+<?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="FromHexPairs">
+  <title>FromHexPairs</title>
+
+  <para><emphasis role="bold">STD.Str.FromHexPairs<indexterm>
+      <primary>STD.Str.FromHexPairs</primary>
+    </indexterm><indexterm>
+      <primary>Str.FromHexPairs</primary>
+    </indexterm><indexterm>
+      <primary>FromHexPairs</primary>
+    </indexterm>(</emphasis> <emphasis>source</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>source</emphasis></entry>
+
+          <entry>The binary data array to process.</entry>
+        </row>
+
+        <row>
+          <entry>Return:<emphasis> </emphasis></entry>
+
+          <entry>FromHexPairs returns a data value with each byte created from
+          a pair of hex digits. </entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <para>The <emphasis role="bold">FromHexPairs </emphasis>function encodes
+  binary data to base64 string. Every 3 data bytes are encoded to 4 base64
+  characters. If the length of the input is not divisible by 3, up to 2 '='
+  characters are appended to the output. </para>
+
+  <para>Example:</para>
+
+  <programlisting format="linespecific">A := STD.Str.FromHexPairs('   00  01  FF 80   ');</programlisting>
+</sect1>

+ 45 - 0
docs/ECLStandardLibraryReference/SLR-Mods/ToHexPairs.xml

@@ -0,0 +1,45 @@
+<?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="ToHexPairs">
+  <title>ToHexPairs</title>
+
+  <para><emphasis role="bold">STD.Str.ToHexPairs<indexterm>
+      <primary>STD.Str.ToHexPairs</primary>
+    </indexterm><indexterm>
+      <primary>Str.ToHexPairs</primary>
+    </indexterm><indexterm>
+      <primary>ToHexPairs</primary>
+    </indexterm>(</emphasis> <emphasis>source</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>source</emphasis></entry>
+
+          <entry>A string containing the hex pairs to convert.</entry>
+        </row>
+
+        <row>
+          <entry>Return:<emphasis> </emphasis></entry>
+
+          <entry>ToHexPairs returns a data value with each byte created from a
+          pair of hex digits.</entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <para>The <emphasis role="bold">ToHexPairs </emphasis>function converts a
+  string containing sequences of hex pairs to a data value.</para>
+
+  <para>Example:</para>
+
+  <programlisting format="linespecific">A := STD.Str.ToHexPairs(D'\000\001\377\200');</programlisting>
+</sect1>

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

@@ -297,7 +297,10 @@
 
     <xi:include href="ECLStandardLibraryReference/SLR-Mods/FindReplace.xml"
                 xmlns:xi="http://www.w3.org/2001/XInclude" />
-
+                
+    <xi:include href="ECLStandardLibraryReference/SLR-Mods/FromHexPairs.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude" />     
+                
     <xi:include href="ECLStandardLibraryReference/SLR-Mods/GetNthWord.xml"
                 xmlns:xi="http://www.w3.org/2001/XInclude" />
 
@@ -321,6 +324,9 @@
 
     <xi:include href="ECLStandardLibraryReference/SLR-Mods/StartsWith.xml"
                 xmlns:xi="http://www.w3.org/2001/XInclude" />
+                                
+    <xi:include href="ECLStandardLibraryReference/SLR-Mods/ToHexPairs.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude" />  
 
     <xi:include href="ECLStandardLibraryReference/SLR-Mods/ToLowerCase.xml"
                 xmlns:xi="http://www.w3.org/2001/XInclude" />