Tech Tip: How to search and replace characters in a string
PRODUCT: 4D | VERSION: 2004 | PLATFORM: Mac & Win
Published On: March 10, 2006
Here is sample code that will help search and replace characters in a string.
The example code is searching for the "é" character, which is 142 on the ascii chart. It will be replaced by the character "t".
For ($i;1;Length(vstring))
If (Ascii(vstring[[$i]])=142)
vstring[[$i]]:="t" ` replace the character
End if
End for
The example code is searching for the "é" character, which is 142 on the ascii chart. It will be replaced by the character "t".
For ($i;1;Length(vstring))
If (Ascii(vstring[[$i]])=142)
vstring[[$i]]:="t" ` replace the character
End if
End for