Difference between revisions of "STR REPLACE()"
From Lianjapedia
Helen.george (Talk | contribs) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to search for and replace text within a character string or memo field | Function to search for and replace text within a character string or memo field | ||
− | |||
==Syntax== | ==Syntax== | ||
STR_REPLACE(<expC1>, <expC2>, <expC3> | <memofield> [, <expN>]) | STR_REPLACE(<expC1>, <expC2>, <expC3> | <memofield> [, <expN>]) | ||
− | |||
==See Also== | ==See Also== | ||
[[AT()]], [[ATNEXT()]], [[CHRTRAN()]], [[INLIST()]], [[LEFT()]], [[OCCURS()]], [[RAT()]], [[RIGHT()]], [[SET STRESCAPE]], [[STR()]], [[STREXTRACT()]], [[STRTRAN()]], [[STUFF()]], [[SUBSTR()]] | [[AT()]], [[ATNEXT()]], [[CHRTRAN()]], [[INLIST()]], [[LEFT()]], [[OCCURS()]], [[RAT()]], [[RIGHT()]], [[SET STRESCAPE]], [[STR()]], [[STREXTRACT()]], [[STRTRAN()]], [[STUFF()]], [[SUBSTR()]] | ||
− | |||
==Description== | ==Description== | ||
Line 15: | Line 12: | ||
The optional count argument, <expN>, can be used to return the number of matched and replaced <expC1> strings. | The optional count argument, <expN>, can be used to return the number of matched and replaced <expC1> strings. | ||
− | |||
==Example== | ==Example== | ||
Line 24: | Line 20: | ||
1 | 1 | ||
</code> | </code> | ||
− | |||
==Products== | ==Products== | ||
Line 30: | Line 25: | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | |||
[[Category:String Data Functions]] | [[Category:String Data Functions]] | ||
[[Category:Lianja VFP Extensions]] | [[Category:Lianja VFP Extensions]] | ||
[[Category:VFP Function Extensions]] | [[Category:VFP Function Extensions]] |
Latest revision as of 06:47, 4 February 2013
Purpose
Function to search for and replace text within a character string or memo field
Syntax
STR_REPLACE(<expC1>, <expC2>, <expC3> | <memofield> [, <expN>])
See Also
AT(), ATNEXT(), CHRTRAN(), INLIST(), LEFT(), OCCURS(), RAT(), RIGHT(), SET STRESCAPE, STR(), STREXTRACT(), STRTRAN(), STUFF(), SUBSTR()
Description
The STR_REPLACE() function will search <expC3> or <memofield> and replace text within <expC3> or <memofield> with <expC2> wherever the occurrence of <expC1> is found. The STR_REPLACE() function returns a character expression that contains the result of the string replacement.
The optional count argument, <expN>, can be used to return the number of matched and replaced <expC1> strings.
Example
? str_replace("ello", "i","Hello World",nCount) Hi World ? nCount 1
Products
Lianja Server, Lianja