Template Function rcpputils::find_and_replace(InputT&&, FindT&&, ReplaceT&&)

Function Documentation

template<typename InputT, typename FindT, typename ReplaceT>
auto rcpputils::find_and_replace(InputT &&input, FindT &&find, ReplaceT &&replace)

Find and replace all instances of a string with another string.

Parameters:
  • input[in] The input string.

  • find[in] The substring to replace.

  • replace[in] The string to substitute for each occurrence of find.

Returns:

A copy of the input string with all instances of the string find replaced with the string replace.