Correct syntax should be:
STRTRAN( cSearched, cExpressionSought [, cReplacement
[, nStartOccurrence [, nNumberOfOccurrences [, nFlags]]]] )
Updated parameter descriptions:
Parameters
cSearched
Specifies the character expression to search. cSearched can also be a memo field, a blob field, or a varbinary expression.
cExpressionSought
Specifies the character expression to search for in cSearched. The search is case-sensitive. cExpressionSought can also be a memo field, a blob field, or a varbinary expression.
cReplacement
Specifies the character expression to replace every occurrence of cExpressionSought in cSearched. Omitting cReplacement replaces every occurrence of cExpressionSought with an empty string.
nStartOccurrence
--- description of this parameter is correct ----
nNumberOfOccurrences
--- description of this parameter is correct ----
--- The Note should be moved here and updated to:
Note
If you need to specify only the nFlags setting along with the required parameters, specify empty string for the cReplacement and –1 for the optional numeric parameters you want disregarded.
nFlags
Specifies the case-sensitivity of a search according to the following values:
--- and the table is correct except the Note ---
the Note for nFlags = 0 should contain the first sentence about versions prior to VFP 7.
Return Value
Character or Varbinary.
STRTRAN( ) returns the resulting character or varbinary string. The Result data type is derived by the first parameter data type.
Examples could contain some varbinary strings, e.g.
? STRTRAN(0h + gcString, 'a', 'z')
? STRTRAN(gcString, 0h61, 0h7A)
See also part could contain STREXTRACT() reference.
STRTRAN( cSearched, cExpressionSought [, cReplacement
[, nStartOccurrence [, nNumberOfOccurrences [, nFlags]]]] )
Updated parameter descriptions:
Parameters
cSearched
Specifies the character expression to search. cSearched can also be a memo field, a blob field, or a varbinary expression.
cExpressionSought
Specifies the character expression to search for in cSearched. The search is case-sensitive. cExpressionSought can also be a memo field, a blob field, or a varbinary expression.
cReplacement
Specifies the character expression to replace every occurrence of cExpressionSought in cSearched. Omitting cReplacement replaces every occurrence of cExpressionSought with an empty string.
nStartOccurrence
--- description of this parameter is correct ----
nNumberOfOccurrences
--- description of this parameter is correct ----
--- The Note should be moved here and updated to:
Note
If you need to specify only the nFlags setting along with the required parameters, specify empty string for the cReplacement and –1 for the optional numeric parameters you want disregarded.
nFlags
Specifies the case-sensitivity of a search according to the following values:
--- and the table is correct except the Note ---
the Note for nFlags = 0 should contain the first sentence about versions prior to VFP 7.
Return Value
Character or Varbinary.
STRTRAN( ) returns the resulting character or varbinary string. The Result data type is derived by the first parameter data type.
Examples could contain some varbinary strings, e.g.
? STRTRAN(0h + gcString, 'a', 'z')
? STRTRAN(gcString, 0h61, 0h7A)
See also part could contain STREXTRACT() reference.