Home / lang / replace 
Previous  Next  Edit  Rename  Undo  Refresh  Search  Administration   
fr  de  es  it  nl  pl  pt  pt_BR  mk  ca  ar  fa  vi  ja  ru  zh  zh_TW  eo 
Documentation
History
 
Replace$
Syntax
Result = Replace$ ( String , Pattern , ReplaceString [ , Comparison ] )
Result = Replace ( String , Pattern , ReplaceString [ , Comparison ] )

Replaces every occurrence of the Pattern string in the String string by the ReplaceString string , and returns the result.

If String is null, then a null string is returned.

If Pattern is null, then String is returned.

Comparison can be one of the following value:

Examples

PRINT Replace$("Gambas is a cool basic", "bas", "BAS")

GamBAS is a cool BASic

PRINT Replace$("Gambas is a cool basic", "a", "")

Gmbs is cool bsic

PRINT Replace$("Gambas is a cool basic", " ", "--")

Gambas--is--a--cool--basic

See also

String Functions