Mioplanet Documentation Center
Resources and Help
HomeProductsMioScriptJavaScriptTechNotesPHP
   Home | MioScript | str.replace SEARCH    

  Functions
str.adjustLineBreaks
str.char
str.comma
str.escape
str.explode
str.implode
str.left
str.len
str.lower
str.pos
str.pos.ex
str.replace
str.right
str.sub
str.trim
str.unescape
str.upper
str.wrapText

  MioScript Reference
> Statements
app...
browser...
dialog...
disk...
draw...
extern...
filename...
keyboard...
menu...
mio...
mouse...
num...
path...
pushButton...
reg...
RS232...
sci...
screen...
shortcut...
sound...
str...
system...
time...
var...
window...

Function
str.replace

Language: MioScript
Product: MioFactory


Syntax

str.replace(sourceString, stringToFind, newString, caseSensitive, replaceAll)


Parameters

STRINGsourceStringSource string.
STRINGstringToFindString to to be replaced by the new string.
STRINGnewStringString to replace the string to find.
BOOLEANcaseSensitiveOptional.
Default is false.
If set to true, the comparison operation is case sensitive.
BOOLEANreplaceAllOptional.
Default is true.
If set to false, the function only replaces the first occurance.


Return value

String.



Description

Replaces a string by another string and returns the result.




MioScript Sample Code

&oldString = "Hello, World!"
&newString = str.replace(&oldString, "World", "Universe")
alert(&bewString)