Question: 1/3 of the methods I need help implementing. As a starting point, iterate through doc->paragraphs[x].lines[y] and use strstr() to test if each line contains the

 1/3 of the methods I need help implementing. As a startingpoint, iterate through doc->paragraphs[x].lines[y] and use strstr() to test if each line

1/3 of the methods I need help implementing. As a starting point, iterate through doc->paragraphs[x].lines[y] and use strstr() to test if each line contains the target string.

10. int replace_text (Document *doc, const char *target, const char *replacement) The function will replace the text target with the text replacement everywhere it appears in the docu- ment. You can assume the replacement will not generate a line that exceeds the maximum line length; also you can assume the target will not be the empty string The function will return FAILURE if doc, target or replacement are NULL; otherwise the function will return SUCCESS. #de fine DOCUMENT H #de fine MAX PARAGRAPH LINES 20 #de fine MAX PARAGRAPHS 15 #de fine MAX STR SIZE 80 #de fine HIGHLIGHT START STR "[" #define HIGHLIGHT END STR "" #de fine SUCCESS #de fine FAILURE - typedef struct { int number of 1ines: char lines[MAX PARAGRAPH LINES 1 [MAX STR SIZE + 11 \ Paragraph; typedef struct { char name [ MAX STR SIZE+ 11 int number of paragraphs; Paragraph paragraphs [MAX PARAGRAPHS]; } Document

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!