Question: c++ This program searches a string for a desired word or pattern and replaces it by another word or pattern. If user wishes to replace
c++

This program searches a string for a desired word or pattern and replaces it by another word or pattern. If user wishes to replace the search pattern with nothing, don't supply the third input. It the pattern is not found the program outputs the original string. The program is case-sensitive and uses C++ string functions found by including the string header file. Test for one or multiple replacements. Test a case where you wish to find the pattern and just remove it. Test a case where the search pattern is not found. Enter the original string in the zylab input box on the next line, enter a pattern to be searched for on the third line, enter what you wish to replace the pattern with Examples: Contents of input box: The large grey fox jumped over the red fence near the red barn and ate a red chicken. red yellow Output: The large grey fox jumped over the yellow fence near the yellow barn and ate a yellow chicken. Contents of input box: I have been so busy. Like homework, and cooking and working!! like like exhausted! Output: I have been so busy. Like homework, and cooking and working!! exhausted! Contents of input box Black is the color of her hair and her clothes were all black. white blue Output: Black is the color of her hair and her clothes were all black
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
