RemoveSuffix.xml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
  4. <sect1 id="RemoveSuffix">
  5. <title>RemoveSuffix</title>
  6. <para><emphasis role="bold">STD.Str.RemoveSuffix<indexterm>
  7. <primary>STD.Str.RemoveSuffix</primary>
  8. </indexterm><indexterm>
  9. <primary>Str.RemoveSuffix</primary>
  10. </indexterm><indexterm>
  11. <primary>RemoveSuffix</primary>
  12. </indexterm>(</emphasis> <emphasis>source, suffix</emphasis> <emphasis
  13. role="bold">)</emphasis></para>
  14. <informaltable colsep="0" frame="none" rowsep="0">
  15. <tgroup cols="2">
  16. <colspec colwidth="80.50pt" />
  17. <colspec />
  18. <tbody>
  19. <row>
  20. <entry><emphasis>source</emphasis></entry>
  21. <entry>The string to search.</entry>
  22. </row>
  23. <row>
  24. <entry><emphasis>suffix</emphasis></entry>
  25. <entry>The ending string to remove.</entry>
  26. </row>
  27. <row>
  28. <entry>Return:<emphasis> </emphasis></entry>
  29. <entry>RemoveSuffix returns a string value.</entry>
  30. </row>
  31. </tbody>
  32. </tgroup>
  33. </informaltable>
  34. <para>The <emphasis role="bold">RemoveSuffix</emphasis> function returns
  35. the <emphasis>source</emphasis> string with the ending text in the
  36. <emphasis>suffix</emphasis> parameter removed. If the <emphasis>source</emphasis> string
  37. does not end with the <emphasis>suffix</emphasis>, then the <emphasis>source</emphasis> string
  38. is returned unchanged.</para>
  39. <para>Example:</para>
  40. <programlisting format="linespecific">IMPORT STD;
  41. STD.STr.RemoveSuffix('a word away','away'); //returns 'a word'
  42. STD.STr.RemoveSuffix('a word a way','away'); //returns 'a word a way'
  43. </programlisting>
  44. </sect1>