|
@@ -5,18 +5,20 @@
|
|
|
<title>ExtractMultiple</title>
|
|
|
|
|
|
<para><emphasis role="bold">STD.Str.ExtractMultiple<indexterm>
|
|
|
- <primary>STD.Str.Extract</primary>
|
|
|
+ <primary>STD.Str.ExtractMultiple</primary>
|
|
|
</indexterm><indexterm>
|
|
|
- <primary>Str.Extract</primary>
|
|
|
+ <primary>Str.ExtractMultiple</primary>
|
|
|
</indexterm><indexterm>
|
|
|
- <primary>Extract</primary>
|
|
|
+ <primary>ExtractMultiple</primary>
|
|
|
</indexterm>(</emphasis> <emphasis>source, instance</emphasis> <emphasis
|
|
|
role="bold">)</emphasis></para>
|
|
|
|
|
|
- <para><emphasis role="bold">STD.Uni.Extract<indexterm>
|
|
|
- <primary>STD.Uni.Extract</primary>
|
|
|
+ <para><emphasis role="bold">STD.Uni.ExtractMultiple<indexterm>
|
|
|
+ <primary>STD.Uni.ExtractMultiple</primary>
|
|
|
</indexterm><indexterm>
|
|
|
- <primary>Uni.Extract</primary>
|
|
|
+ <primary>Uni.ExtractMultiple</primary>
|
|
|
+ </indexterm><indexterm>
|
|
|
+ <primary>ExtractMultiple</primary>
|
|
|
</indexterm>(</emphasis> <emphasis>source, instance</emphasis> <emphasis
|
|
|
role="bold">)</emphasis></para>
|
|
|
|
|
@@ -34,7 +36,7 @@
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
- <entry><emphasis>instance </emphasis></entry>
|
|
|
+ <entry><emphasis>mask </emphasis></entry>
|
|
|
|
|
|
<entry>An integer specifying the ordinal position of the data item
|
|
|
within the <emphasis>source</emphasis> to return.</entry>
|
|
@@ -43,48 +45,22 @@
|
|
|
<row>
|
|
|
<entry>Return:<emphasis> </emphasis></entry>
|
|
|
|
|
|
- <entry>Extract returns either a STRING or UNICODE value, as
|
|
|
+ <entry>ExtractMultiple returns either a STRING or UNICODE value, as
|
|
|
appropriate.</entry>
|
|
|
</row>
|
|
|
</tbody>
|
|
|
</tgroup>
|
|
|
</informaltable>
|
|
|
|
|
|
- <para>The <emphasis role="bold">Extract </emphasis>function returns the data
|
|
|
- at the ordinal position specified by the <emphasis>instance
|
|
|
- </emphasis>within the comma-delimited <emphasis>source</emphasis>
|
|
|
- string.</para>
|
|
|
+ <para>The <emphasis role="bold">ExtractMultiple </emphasis>function returns
|
|
|
+ the data at the bitmask positions specified by the <emphasis>mask
|
|
|
+ </emphasis>within the comma-delimited <emphasis>source</emphasis> string.,
|
|
|
+ where bit 0 is item 1, bit 1 is item 2, etc.</para>
|
|
|
|
|
|
<para>Example:</para>
|
|
|
|
|
|
- <programlisting format="linespecific">//all these examples result in 'Success'
|
|
|
-
|
|
|
-A := IF(STD.Str.Extract('AB,CD,,G,E',0) = '',
|
|
|
- 'Success',
|
|
|
- 'Failure -1');
|
|
|
-
|
|
|
-B := IF(STD.Str.Extract('AB,CD,,G,E',1) = 'AB',
|
|
|
- 'Success',
|
|
|
- 'Failure -2');
|
|
|
-
|
|
|
-C := IF(STD.Str.Extract('AB,CD,,G,E',2) = 'CD',
|
|
|
- 'Success',
|
|
|
- 'Failure -3');
|
|
|
-
|
|
|
-D := IF(STD.Str.Extract('AB,CD,,G,E',3) = '',
|
|
|
- 'Success',
|
|
|
- 'Failure -4');
|
|
|
-
|
|
|
-E := IF(STD.Str.Extract('AB,CD,,G,E',4) = 'G',
|
|
|
- 'Success',
|
|
|
- 'Failure -5');
|
|
|
-
|
|
|
-F := IF(STD.Str.Extract('AB,CD,,G,E',5) = 'E',
|
|
|
- 'Success',
|
|
|
- 'Failure -6');
|
|
|
-
|
|
|
-G := IF(STD.Str.Extract('AB,CD,,G,E',6) = '',
|
|
|
- 'Success',
|
|
|
- 'Failure -7');
|
|
|
+ <programlisting format="linespecific">IMPORT STD;
|
|
|
+MyTestString:= 'You, only, live, twice';
|
|
|
+STD.Str.ExtractMultiple(MyTestString, 0b10011 ); //returns 'You, only'
|
|
|
</programlisting>
|
|
|
</sect1>
|