Преглед изворни кода

Merge pull request #9919 from JamesDeFabia/15942FindWord

HPCC-15942 Document STD.String.FindWord

Reviewed-By: Greg Panagiotatos <Greg.Panagiotatos@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman пре 8 година
родитељ
комит
e2226a0149

+ 72 - 0
docs/ECLStandardLibraryReference/SLR-Mods/FindWord.xml

@@ -0,0 +1,72 @@
+<?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="FindWord">
+  <title>FindWord</title>
+
+  <para><emphasis role="bold">STD.Str.FindWord<indexterm>
+      <primary>STD.Str.FindWord</primary>
+    </indexterm><indexterm>
+      <primary>Str.FindWord</primary>
+    </indexterm><indexterm>
+      <primary>FindWord</primary>
+    </indexterm>(</emphasis> <emphasis>src, word, ignore_case</emphasis>
+  <emphasis role="bold">)</emphasis> <emphasis role="bold"></emphasis></para>
+
+  <para><emphasis role="bold">STD.Uni.FindWord<indexterm>
+      <primary>STD.Uni.FindWord</primary>
+    </indexterm><indexterm>
+      <primary>Uni.FindWord</primary>
+    </indexterm>(</emphasis> <emphasis>src, word, ignore_case</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>src</emphasis></entry>
+
+          <entry>A string containing the data to search.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>word </emphasis></entry>
+
+          <entry>A string containing the substring to search for.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>ignore_case </emphasis></entry>
+
+          <entry>A boolean true or false to indicate whether to ignore the
+          case.</entry>
+        </row>
+
+        <row>
+          <entry>Return:<emphasis> </emphasis></entry>
+
+          <entry>FindWord returns a BOOLEAN value.</entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <para>The <emphasis role="bold">FindWord </emphasis>functions return TRUE if
+  the <emphasis>word</emphasis> string is found in <emphasis>src</emphasis>
+  string. </para>
+
+  <para>Example:</para>
+
+  <programlisting format="linespecific">IMPORT STD;
+src := 'Now is the winter of our discontent';
+word := 'now';
+
+STD.Str.FindWord(src,word);      // false - case not ignored
+STD.Str.FindWord(src,word,TRUE); // true  - with case ignored word is found</programlisting>
+
+  <para></para>
+</sect1>

+ 3 - 0
docs/ECLStandardLibraryReference/SLR-includer.xml

@@ -294,6 +294,9 @@
     <xi:include href="ECLStandardLibraryReference/SLR-Mods/FindReplace.xml"
                 xmlns:xi="http://www.w3.org/2001/XInclude" />
 
+    <xi:include href="ECLStandardLibraryReference/SLR-Mods/FindWord.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" />