xtd 0.2.0
Loading...
Searching...
No Matches

◆ replace() [1/2]

template<typename char_t , typename traits_t , typename allocator_t >
basic_string xtd::basic_string< char_t, traits_t, allocator_t >::replace ( value_type  old_char,
value_type  new_char 
) const
inlinenoexcept

Replaces all occurrences of a specified char_t in this basic_string with another specified char_t.

Parameters
old_charA char_t to be replaced.
new_charA char_t to replace all occurrences of old_char.
Returns
A new basic_string equivalent to the specified basic_string but with all instances of old_char replaced with new_char.
Examples
file_info_replace.cpp.