Bash++
Bash++ compiler internal documentation
Functions
replace_all.cpp File Reference
#include <string>
Include dependency graph for replace_all.cpp:

Functions

std::string replace_all (std::string str, const std::string &from, const std::string &to)
 Replace all occurences of a substring in a string. More...
 

Function Documentation

◆ replace_all()

std::string replace_all ( std::string  str,
const std::string &  from,
const std::string &  to 
)

Replace all occurences of a substring in a string.

Copyright (C) 2025 rail5 Bash++: Bash with classes

Parameters
strThe string to search in
fromThe substring to search for
toThe substring to replace with