replace


Description:

public static string replace (string? s, string old_str, string new_str)

Replace all occurrences of old_str with new_str.

Example:

    assert (Strings.replace ("hello world", "world", "vala") == "hello vala");

Parameters:

s

the original string.

old_str

the substring to find.

new_str

the replacement string.

Returns:

string with all replacements applied.