(Formerly known as global function StrSetCharAt, which is now obsolete)
String.ReplaceCharAt(int index, char newChar)
Changes the character at INDEX in the string to NEWCHAR.
INDEX is the character index into the string (where 0 is the first character,
and the last allowable value is the string's Length minus 1).
NOTE: The new string is returned from this function; it
does NOT modify the original string.
Example:
String mystring = "Hello";
String changed = mystring.ReplaceCharAt(2, 'm');
Display("Old: %s, new: %s", newstring, changed);
will display "Old: Hello, new: Hemlo".
See Also: String.Chars,
String.Replace
|