Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char *deleteWord(char *line, char *word)}{
- int wordSize, i = 0, found, count;
- char *p;
- int w = 0;
- for (i; line[i] != '\0'; i++){
- if (line[i]==word[w]){
- if (count==0){found = i;}
- w++;
- count++;
- if (word[w]=='\0'){
- strcpy(line[found], line[i+1]);
- i = found-1;
- }
- }
- else{
- count = 0;
- w = 0;
- }
- }
- return line;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement