Replace

"-->
 Replace (string, substring1, substring2 [, scope]) 

Description

A case-sensitive search that replaces substring1 with substring2 in a string. scope can be one, which replaces the first occurrence, or all, which replaces all occurrences.

Example

 <cfset exampleString = "This is a test of the emergency broadcasting system">  <cfset exampleString2 = "George George George of the Jungle">  <cfoutput>  #Replace(exampleString, "broadcasting", "ColdFusion")#  #Replace(exampleString2, "George", "", all)#  </cfoutput>  


Inside ColdFusion MX
Inside Coldfusion MX
ISBN: 0735713049
EAN: 2147483647
Year: 2005
Pages: 579

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net