Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Harbour Version 0.37 (c) reference Guid - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

STRTRAN()

Translate substring valuw with a main string
---------------------------------------------------------------------------------

 Syntax

        STRTRAN(  <cString>, <cLocString>, <cRepString>, <nPos>, <nOccurences>
      ) --> cReturn

 Arguments

        <cString>       The main string to search      

        <cLocString>    The string to locate in the main string      

        <cRepString>    The string to replace the <cLocString>      

        <nPos>          The first occurence to be replaced      

        <nOccurences>   Number of occurence to replace    

 Returns

        <cReturn>    Formated string    

 Description

      This function searches for any occurence of <cLocString> in <cString>
      and replacesit with <cRepString>.If <cRepString> is not specified,
      a  NULL byte will replace <cLocString>.

      If <nPos> is used,its value defines the first occurence to be
      replaced.The default value is 1.Additionally,if used,the value of
      <nOccurences> tell the function how many occurrences of <cLocString>
      in <cString> are to the replaced.The default of <nOccurences> is
      all occurrences.

 Examples

      ? StrTran("Harbour  Power","  "," ") // Harbour Power
      ? StrTran("Harbour  Power  The Future  of  xBase","  "," ",,2) // Harbour Power The future  of  xBase

 Tests

      See regression test

Status

      Ready

 Compliance

      Will not work with a search string of > 64 KB on some platforms

 Platforms

      All

 Files

      Libraty is rtl



See Also: SUBSTR() AT()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson