String find and replace program using Boyer-Moore Horspool algorithm programmed in C.
The program has 3 main part:
-
Read the data including file name, the word to be changed, the word to be replaced and case sensitive or not flag.
-
Boyer-Moore Horspool algorithm.
- Put the string in the file into an array.
- Find every words to be changed and replace with new word.
- Write the array into same file.
-
Report.
- Write number of the words changed and process time to screen.
Sample Inputs and Outputs:
Input:
Process-1 and Output-1 (Case sensitive off)
Process-2 and Output-2 (Case sensitive on)