Hi Brenda
>How can I take a string and replace certain constants with constants of a largers, or smaller size? Say I want to replace all ':' with ': '. There are several different constants and each constant could have many different occurances. I am using VFP 6.0.
As others have said, STRTRAN() allows to replace specific characters (or groups of characters) with another character, or group of characters. Even in VFP 6, you can specify the starting occurrence (i.e. first, second etc) and the number of replacements - though you do not get the additional control over case sensitivity that VFP 7.0 introduced.
However, STRTRAN is designed to replace datsa, if you want merely want to insert one or more characters, then you can use the AT() and STUFF() functions to determine the location in a string and insert the new characters directly.
----
Regards
Andy Kramek