asp.net.ph

String.Replace Method ( String, String )

System Namespace   String Class


Replaces all occurrences of a specified String in the given String, with another specified String.

[ VB ]
<Serializable>
Overloads Public Function Replace ( _
   ByVal oldValue As String, _
   ByVal newValue As String _
) As String

[ C# ]
[ Serializable ]
public string Replace (
   string oldValue,
   string newValue
);

[ C++ ]
[ Serializable ]
public: String* Replace (
   String* oldValue,
   String* newValue
);

[ JScript ]
public Serializable
function Replace (
   oldValue : String,
   newValue : String
) : String;

Parameters

oldValue
A String to be replaced.
newValue
A String to replace all occurrences of oldValue.

Return Value

A String equivalent to this instance but with all instances of oldValue replaced with newValue.

Remarks

If newValue is a null reference ( Nothing in Visual Basic ), oldValue is removed.

See Also

String Members   String.Replace Overload List   Concat   Insert   Join   Remove   Split   Substring   Trim Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph