BBjString::replace
Description
In BBj 7.00 and higher, this method replaces each substring of this string that matches the literal target sequence with the specified literal replacement sequence. The replacement proceeds from the beginning of the string to the end, for example, replacing "aa" with "b" in the string "aaa" will result in "ba" rather than "ab".
Syntax
| Return Value | Method |
|---|---|
|
String |
replace(CharSequence target, CharSequence replacement) replace(char oldChar, char newChar) |
Parameters
| Parameter | Description |
|---|---|
|
target |
The sequence of char values to be replaced. |
|
replacement |
The replacement sequence of char values. |
|
oldChar |
The old character. |
|
newChar |
The new character. |
Return Value
Returns the resulting string.
Example
|
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.