Performs a replace on whole words, rather than substrings. This is similar to WordStrTran in SQ.VFP, except this version doesn't account for having non-word characters as the first or last character in oldvalue. So, for example, if you want to replace "tablename" in "tablename.fieldname", call this with "tablename" as the oldvalue, rather than "tablename."

public static string ReplaceWord(string replacein,
	string oldvalue,
	string newvalue)

Return Value

A string with each occurence of oldvalue (as a complete word) replaced with newvalue


The string to do the replacement on

The value to find

The value to replace oldvalue with

See also:

Class StringFunctions