Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>chrswap() - swap characters in a string</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     chrswap() - swap characters in a string
  Usage:    <string> = chrswap(<string>,<char1>,[<char2>])
  Params:   string <string> - the string to search in
            char <char1> - the character to find
            char <char2> - the character to swap with <char1> -
            optional, if left off or null then <char1> is omitted
            from the return string.
  Returns:  a string equal to <string> with all characters that match
            <char1> replaced with <char2>

 ---------------------------------- Example ---------------------------------

                 ? chrswap("This is the string","i","a")
                 * prints "Thas as the strang"

                 ? chrswap("This is the string","i")
                 * prints "Ths s the strng"

  Hint:     Useful for swapping out tab characters in text files


See Also: chrcount() chrfound() leadchar() trailchar()

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