Reduce( )

Microsoft Visual FoxPro Foxtools

Reduce( )

Replaces specified characters in a string with a space.


Reduce(cSearch, cReplace)


Specifies the character string to change.


Specifies the characters to search for and replace with a space. If you specify more than one character, the characters are treated separately during the reduction; they aren't treated as a single multicharacter string.

Return Type



Replaces characters specified in cReplace with a space, then removes leading spaces and repeated spaces within the string. The function is commonly used to replace a group of spaces in a string with a single space, or to replace delimiters such as tabs or carriage returns with a space.