String.replace

Class Overview | Class Members | This Package | All Packages

Syntax

public String replace( char oldChar**, char** newChar )

Parameters
  • oldChar
    the old character.
  • newChar
    the new character.
Returns

a string derived from this string by replacing every occurrence of oldChar with newChar.

Description

Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.

If the character oldChar does not occur in the character sequence represented by this object, then this string is returned.