chrswap( ) Function

Description:
  The chrswap() function exchanges one character for another in a string.  

Syntax:
  retval = chrswap( cString, cOld, cNew )

Parameters:
  string: cString String to change.
  string: cOld Character to change.
  string: cNew Replacement character.
  string: retval New string with changed characters.

Platforms:
  Windows, DOS, Internet Active Pages



Example:

	local retval, cOld, cNew, cString
	cString = "abcabcabcabcabcabcabc"
	cOld = prompt( "Please Enter a, b or c ", "b", 5 )
	cNew = prompt( "Please Enter a new charater", "z", 5 )
	retval = chrswap( cString, cOld, cNew )
	
	println( "This is the original string  " + cString )
	println( "This is the new string       " + retval )
	println( "You picked " + cOld )
	println( "It was swapped with " + cNew )

  

(c) 2000-2001 by West Coast Web Adventures, Inc., All Rights Reserved