Skip to end of banner
Go to start of banner

replace

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Availability

This routine is available starting with SIL Engine™ 1.0.

Syntax

replace(str, search_str, replacement_str)

Description

Replaces the search_str string with replacement_str in str and returns the resulting string. The string str is not modified.

Parameters

Parameter name

Type

Required

Description

str

string

Yes

Specifies the string to replace characters for.

search_str

string

Yes

Specifies a character expression to search for in str.

replacement_str

string

Yes

Specifies the string that replaces search_str.

Return type

string

Example

Example 1

wret = replace("foobar", "foo", "bar");
print(wret);

Print barbar

Example 2

wret = replace("aaa", "aa", "b");
print(wret);

Print ba

See also


  • No labels