Thread: How to remove all occurrences of a WORD from a FILE in C

  1. #1
    Registered User
    Join Date
    Oct 2018
    Posts
    30

    How to remove all occurrences of a WORD from a FILE in C

    Hello cboard,

    I'm happy to have become a member. This thread is one of two to be posted now or latter. I am new to C so please excuse my non-technical speech. I have been learning by examples (inline, no calling), and I was doing a good job up until now. Since requiring something new for my project, all week long, from sun up to sun down I have not yet found or figured out *How to delete or remove a word from a file*. I read much C documentation to no avail (but great for other stuff). Google result are always *How to delete a word in a string* and they all require user input to the terminal which I don’t need. A picture is worth a thousand words. Could someone modify this example to do what I’m after. I modified this example 50 ways. Below I only include the unconnected FILE function instead of posting all the garbage I came up with while trying.

    Any help would be greatly appreciated. Thank you.

    Code:
      /**
     * C program to delete a word from file.
     */
    
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    
    #define BUFFER_SIZE 1000
    
    
    void removeAll(char * str, const char * toRemove);
    
    
    int main()
    {
        FILE * fPtr;
        FILE * fTemp;
        char path[100];
        
        char toRemove[100];
        char buffer[1000];
    
    /**
    *char word[] = "remove me"; ............ something like this to search
    
    *FILE *_read_0,*write_0;
    *
    *  _read_0=fopen("1.txt","r"); ......... something like this to work
    *  write_0=fopen("2.txt","w");
    */
     
     
        /* Input source file path path */
        printf("Enter path of source file: ");
        scanf("%s", path);
    
        printf("Enter word to remove: ");
        scanf("%s", toRemove);
    
    
        /*  Open files */
        fPtr  = fopen(path, "r");
        fTemp = fopen("delete.tmp", "w"); 
    
        /* fopen() return NULL if unable to open file in given mode. */
        if (fPtr == NULL || fTemp == NULL)
        {
            /* Unable to open file hence exit */
            printf("\nUnable to open file.\n");
            printf("Please check whether file exists and you have read/write privilege.\n");
            exit(EXIT_SUCCESS);
        }
    
    // /////////////////////////////////////////////////////////////////////
    // /////////////////////////////////////////////////////////////////////
    // /////////////////////////////////////////////////////////////////////
    // /////////////////////////////////////////////////////////////////////
    
        /*
         * Read line from source file and write to destination 
         * file after removing given word.
         */
        while ((fgets(buffer, BUFFER_SIZE, fPtr)) != NULL)
        {
            // Remove all occurrence of word from current line
            removeAll(buffer, toRemove);
    
            // Write to temp file
            fputs(buffer, fTemp);
        }
    
    
        /* Close all files to release resource */
        fclose(fPtr);
        fclose(fTemp);
    
    
        /* Delete original source file */
        remove(path);
    
        /* Rename temp file as original file */
        rename("delete.tmp", path);
    
    
        printf("\nAll occurrence of '%s' removed successfully.", toRemove);
    
    /**
    *    fclose(_read_0);       ? ? ?
    *    fclose(write_0);
    */
    
        return 0;
    }
    
    
    
    /**
     * Remove all occurrences of a given word in string.
     */
    void removeAll(char * str, const char * toRemove)
    {
        int i, j, stringLen, toRemoveLen;
        int found;
    
        stringLen   = strlen(str);      // Length of string
        toRemoveLen = strlen(toRemove); // Length of word to remove
    
    
        for(i=0; i <= stringLen - toRemoveLen; i++)
        {
            /* Match word with string */
            found = 1;
            for(j=0; j < toRemoveLen; j++)
            {
                if(str[i + j] != toRemove[j])
                {
                    found = 0;
                    break;
                }
            }
    
            /* If it is not a word */
            if(str[i + j] != ' ' && str[i + j] != '\t' && str[i + j] != '\n' && str[i + j] != '\0') 
            {
                found = 0;
            }
    
            /*
             * If word is found then shift all characters to left
             * and decrement the string length
             */
            if(found == 1)
            {
                for(j=i; j <= stringLen - toRemoveLen; j++)
                {
                    str[j] = str[j + toRemoveLen];
                }
    
                stringLen = stringLen - toRemoveLen;
    
                // We will match next occurrence of word from current index.
                i--;
            }
        }
    }
    Last edited by fat32; 11-04-2018 at 07:09 PM.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    27,507
    How does this not do what you want?

    Instead of implementing that search for the string to be deleted in removeAll, use strstr from <string.h>

  3. #3
    Registered User
    Join Date
    Oct 2018
    Posts
    30
    Hi @laserlight!

    How does this not do what you want?
    The code above was written to accept user-input to search a string and delete all occurrences of a word. I need to see this code modified to do two simple things.
    1) Delete all occurrence of a word in a FILE with the word to search already build-in the program which I can change at any time, for example:

    Code:
    char word[] = "remove me";
    and it must use:
    Code:
    FILE *_read_0 = fopen("1.txt", "r");
    FILE *write_0 = fopen("2.txt", "w");
    and not …
    Code:
    printf("Enter word to remove: ");
    2) I would study this file as if it was the Holy Bible. It would instantly teach me how to write and modify code found on the internet that only show function, printf forconsole mode and short code where one would need to know where and how to use it. I’m new, I don’t know everything yet. So this example does not do what I need and if I knew how to modify it myself I would have never posted.

    Instead of implementing that search for the string to be deleted in removeAll, use strstr from <string.h>
    Sounds like the perfect plan, I just witness that strstr works miracles however I don’t know enough.

    It doesn’t matter if someone modify the code above or provide something else that can get the job done as efficiently as possible. All I ask is that it be design as standalone and that works for files. All I want to do with C is to learn string manipulation within files. Sorry for being long-winded. Thank for asking.

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    27,507
    (Pardon if this is my second reply as I'm having trouble replying on mobile.)

    By showing me that example, you have written the code yourself. You just need to replace the code that does interactive input with your own example code, but for this you need to understand the code, and you obviously don't. You found an example online and have been blindly modifying it hoping that it would do what you want, but that is not the way.

    You should work through an introductory book or tutorial on C to learn C programming. You cannot learn "string manipulation within files" in C without learning the basics of C programming. So no, someone spoonfeeding you a program that does exactly what you want will not be a "Holy Bible" for you to study when you don't know fundamental C programming. Once you can understand the code examples that you find online, then finding them and modifying them will be useful to do what you want, but that is a wrong starting point.

  5. #5
    Registered User
    Join Date
    Oct 2018
    Posts
    30
    Not much is simple if you never done it before. Other than the file operation in the code above all I need to know is how to connect fread(), fwrite() to a file that dont come complete with it. There are a million to one C examples that comes with fprintf() fscanf() or nothing at all.

    With the much smaller code below, could someone show me how it is done by completing the code using fread() and fwrite()?

    Code:
    #include <stdio.h>
    #include <stdlib.h>
    
    int main(){
    
    *FILE *_read_0,*write_0;
    *
    *  _read_0=fopen("1.txt","r"); .... how to get this to work with the code below?
    *  write_0=fopen("2.txt","w");
    */
    
    int del_x_char(char *p, int x)
    {
        char *q;
        x=first_occurance(p, 'i')      /*replace any character you want delete with 'i'*/
        q=p+x;
        while(*q=*(q+1))
            q++;
        *q='\0';
        return 0;
    }
    int first_occurance(char *q, char phar)
    {
        int i=0;
        while(*q)
        {   
            if(*q++==phar)
                return i;
            i++;
        }
        return -1;
    }
    
    return 0;
    }

  6. #6
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    27,507
    The code that uses fgets and fputs is along the right track. There's an issue when the buffer is not long enough for a line and it cuts off in the middle of a word that matches the string to be deleted, but you can worry about that later.

    fread and fwrite would be more for when you have a struct to read/write.

    You don't need a million examples if you would work through structured learning material that teaches you C programming as you would then have a much better idea of what you should look for.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  7. #7
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by fat32 View Post
    Not much is simple if you never done it before. Other than the file operation in the code above all I need to know is how to connect fread(), fwrite() to a file that dont come complete with it. There are a million to one C examples that comes with fprintf() fscanf() or nothing at all.

    With the much smaller code below, could someone show me how it is done by completing the code using fread() and fwrite()?

    Code:
    #include <stdio.h>
    #include <stdlib.h>
    
    int main(){
    
    *FILE *_read_0,*write_0;
    *
    *  _read_0=fopen("1.txt","r"); .... how to get this to work with the code below?
    *  write_0=fopen("2.txt","w");
    */
    
    int del_x_char(char *p, int x)
    {
        char *q;
        x=first_occurance(p, 'i')      /*replace any character you want delete with 'i'*/
        q=p+x;
        while(*q=*(q+1))
            q++;
        *q='\0';
        return 0;
    }
    int first_occurance(char *q, char phar)
    {
        int i=0;
        while(*q)
        {   
            if(*q++==phar)
                return i;
            i++;
        }
        return -1;
    }
    
    return 0;
    }
    Notwithstanding Laserlight's response above which is excellent advice; even taking you at your word I don't know how much we can help you. You know that you don't want the lines
    Code:
        fPtr  = fopen(path, "r");
        fTemp = fopen("delete.tmp", "w");
    and that you do want the lines
    Code:
      FILE*  _read_0=fopen("1.txt","r"); 
      FILE *write_0=fopen("2.txt","w");
    ... so what's stopping you from replacing the lines at the top with the lines from the bottom?

    (And even here, we see how important is to at least be able to "read" the code -- you'll need to know what each of the pieces here mean, because you'll need to make corresponding changes elsewhere in the program to match the changes here.)

  8. #8
    Registered User
    Join Date
    Oct 2018
    Posts
    30
    And to speak of comprehension; I thought that was my problem.
    even taking you at your word I don't know how much we can help you
    I would never claim someones code to have been written by me. If I wrote it I would say see my code above or see the code. Please re-read my thread. You will notice everything is said around these two statements:

    I have been learning by examples I modified this example 50 ways
    That meant I been working on this code I found it for a few weeks to no avail.

    Anyway @tabstop, your comments reminded me how I use to do it in perl. I stop coding in fasm a few years ago.

    Code:
    ... so what's stopping you from replacing the lines at the top with the lines from the bottom?
    Although you said it with a difference meaning it hit a nerve. I fear C and I simple forgot it just like the rest but fasters. All I got to do is replace input/out variables with my input/out then change the name to what I use for readability that suit me with is _read_0 and write_0. Im not use to fPtr and such. And I was hoping that someone would catch on to what I was trying to do. That is why I out that block in comments that was MY only part of the code.

    Code:
    To change    fPtr    to    _read_0        though-out the code
    To change     fTemp to    write_0                
    To change     path    to    write_0        Here is where I got TRAP!
    I ask myself how is the variable path being used by fopen and char path[100]? I dont remember seeing nothing like that before when working with perl code. But when I think about it I did not deal with terminal programming or even use it othen then to compile the code.

    path is what threw me off. In under a month I manage to learn enough C to include five main procedures to make my own type HTML stripper to meet my needs. Yet, it still has three more procedures to complete. It was @ john.c that save my assies with the first problem. I was too reluctant to post this one at the same time. I had just joined.

    Anyway, as @laserlight suggested, I already starting reading into Tutorialspoint C Tutorial, and I realize I got a long way to go. However, I must complete this project ASAP.

    Would it be too much to ask someone to post a working solution that use two or three files on disk as my project requires? I should have asked in the first place.

    As you see I was trying to do it on my own by reversing this wonderful piece of code. I just dont know how to replace [b]scanf()[b/] and [b]printf()[b/] with [b]getchar()[b/] &[b]putchar()[b/] functions, including whatever else it takes to meet success. This is what I do all my life for other type functions when it come to perl and fasm code. I lost the magic touch since C, I guest.

    I thank you all!

  9. #9
    Registered User
    Join Date
    Oct 2018
    Posts
    30

    Good news!

    Tonight I just reduced my HTML file down from a whopping 76K to a tiny 560 bytes with my shiny new c program. All I have to dig out is approx 90% of perfect text. All tags and such are gone!

    I’m thinking that I could use perl substr to clean it up but that would defeat my purpose because I going to do it all with one 350-rocket, C file. I already have a perl version just in case all else fail. However if there is a drastic change at the website; it’s going to take a lot of work to rewrite perl. This will not be the case for the C file. I will still get the same text no matter where it goes. I’m loving it!

    Anyway, since there is no substr in the C library. Google listed the only one in the entire world:

    Substr

    Could someone tighten it up for me. I’m reading everything that I can about it including here at the C Tutorial to try to do what I been crying about through-out this entire thread. Other then that, which type is the fastest and the most reliable out the two listed in the thread posted above?
    Last edited by fat32; 11-06-2018 at 03:37 AM.

  10. #10
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    27,507
    Quote Originally Posted by fat32
    Would it be too much to ask someone to post a working solution that use two or three files on disk as my project requires? I should have asked in the first place.
    Since you apparently managed to get it to work, here's how I might have done it:
    Code:
    /**
     * C program to copy text from a file to another file, without the given word
     * to remove.
     */
    
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    
    /* Configuration variables */
    #define INPUT_FILENAME "1.txt"
    #define OUTPUT_FILENAME "2.txt"
    #define WORD_TO_REMOVE "remove me"
    #define VERBOSE 1
    
    size_t copyWithoutRemovedWord(FILE *output_fp,
                                  FILE *input_fp,
                                  const char *word_to_remove);
    size_t removeAll(char *text, const char *word_to_remove);
    
    int main(void)
    {
        FILE *input_fp;
        FILE *output_fp;
        size_t remove_count;
    
        if (!(input_fp = fopen(INPUT_FILENAME, "r")))
        {
            fprintf(stderr,
                    "Error: could not open '%s' for input.\n",
                    INPUT_FILENAME);
            return EXIT_FAILURE;
        }
    
        if (!(output_fp = fopen(OUTPUT_FILENAME, "w")))
        {
            fprintf(stderr,
                    "Error: could not open '%s' for output.\n",
                    OUTPUT_FILENAME);
            fclose(input_fp);
            return EXIT_FAILURE;
        }
    
        remove_count = copyWithoutRemovedWord(output_fp, input_fp, WORD_TO_REMOVE);
    
        fclose(output_fp);
        fclose(input_fp);
    
        if (VERBOSE)
        {
            printf("%zu occurrences of '%s' removed successfully.\n",
                   remove_count, WORD_TO_REMOVE);
        }
    
        return 0;
    }
    
    /**
     * Copy all text from the input stream to the output stream without any
     * occurrences of the removed word.
     */
    size_t copyWithoutRemovedWord(FILE *output_fp,
                                  FILE *input_fp,
                                  const char *word_to_remove)
    {
        size_t remove_count = 0;
        char buffer[BUFSIZ];
        while (fgets(buffer, BUFSIZ, input_fp))
        {
            /* There is a potential bug when a line is too long to fit in the
               buffer, so we shall warn the user if that condition occurs: */
            if (!strchr(buffer, '\n'))
            {
                fprintf(stderr,
                        "Warning: the word to remove might not be found as the "
                        "line was only partially read for the searching.\n");
            }
    
            remove_count += removeAll(buffer, word_to_remove);
            fputs(buffer, output_fp);
        }
        return remove_count;
    }
    
    /**
     * Remove all occurrences of the word to remove from the text.
     */
    size_t removeAll(char *text, const char *word_to_remove)
    {
        const size_t word_to_remove_len = strlen(word_to_remove);
        size_t removal_count = 0;
        char *removal_point = NULL;
        char *found;
        while ((found = strstr(text, word_to_remove)))
        {
            if (removal_point)
            {
                /* Shift the substring between the previous removal point and the
                   current word found to overwrite the previous removal point: */
                while (text != found)
                {
                    *removal_point++ = *text++;
                }
            }
            else
            {
                /* Do not overwrite the word to remove yet, but rather record the
                   removal point: */
                removal_point = found;
            }
    
            text = found + word_to_remove_len;
            ++removal_count;
        }
    
        /* Since we avoid doing extra work by only shifting when the next removal
           point is found, we need to shift the remaining substring to overwrite
           the last removal point: */
        if (removal_point)
        {
            while ((*removal_point++ = *text++));
        }
    
        return removal_count;
    }
    Notice that you only need to change the configuration variables. I added VERBOSE because when everything works fine, one convention is to print nothing (so VERBOSE would be set to 0), but sometimes people do want something to be printed as a positive confirmation that all went well, in which case VERBOSE would be set to 1.

    Clearly, a disadvantage of this approach is that you have to recompile whenever you want to change the value of a configuration variable, but as that is apparently what you want, you have to live with it. Typically, better approaches would involve things like command line arguments or a configuration file (e.g., in an INI format). Also, instead of requiring the user to specify an input filename and an output filename, another approach is to read from standard input and write to standard output, then the user can use I/O redirection to read/write from/to the input/output files.

    Quote Originally Posted by fat32
    Could someone tighten it up for me. I’m reading everything that I can about it including here at the C Tutorial to try to do what I been crying about through-out this entire thread. Other then that, which type is the fastest and the most reliable out the two listed in the thread posted above?
    The two implementations have different capabilities, so it doesn't make sense to talk about "fastest and most reliable" when they don't do the same thing. What exactly do you have in mind when you say "substr"?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  11. #11
    Registered User Kernelpanic's Avatar
    Join Date
    Sep 2018
    Location
    Berlin
    Posts
    103
    @laserlight - I have a question about the program. Is it intended that a single word in a text-file not be copied and then deleted? I get in this case a warning.
    I have experience difficulties to understand the code.

    How to remove all occurrences of a WORD from a FILE in C-text-kopieren-jpg

  12. #12
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by fat32 View Post
    I would never claim someone’s code to have been written by me. If I wrote it I would say see my code above or see the code. Please re-read my thread. You will notice everything is said around these two statements:
    The "taking you at your word" is not referring to which bits of the code were yours and which weren't; but to the fact that the problem you were claiming to have was that you had commented out some replacement lines instead of using those replacement lines. There's not anything else for us to tell you to do but to use those lines instead of commenting them out.


    Quote Originally Posted by fat32 View Post
    Code:
    To change    fPtr    to    _read_0        though-out the code
    To change     fTemp to    write_0            “    “
    To change     path    to    write_0        Here is where I got TRAP!
    You should be able to see right here that path doesn't become write_0, since fTemp is becoming write_0. path is becoming ... "1.txt" -- you already had that in your replacement.

    Quote Originally Posted by fat32 View Post
    I ask myself … how is the variable path being used by fopen and char path[100]?
    This sentence starts out so well; asking yourself how path is used by fopen is what tells you it needs to be replaced by "1.txt" (which you had seemingly already figured out). But then comes the "char path[100]" part of the sentence, which is worrisome; I can't even come up with a situation where you would even think that's a good question to ask. You're asking how a variable is used by itself, which I suppose might make an interesting Friday night beer-and-pizza discussion, but as a practical matter isn't really a meaningful question.

    Quote Originally Posted by fat32 View Post
    As you see I was trying to do it on my own by reversing this wonderful piece of code. I just don’t know how to replace [b]scanf()[b/] and [b]printf()[b/] with [b]getchar()[b/] &[b]putchar()[b/] functions, including whatever else it takes to meet success. This is what I do all my life for other type functions when it come to perl and fasm code. I lost the magic touch since C, I guest.
    Is there a reason that you would want to replace scanf and printf with getchar and putchar? In fact, that would be the opposite of what you want to do so far as I can tell -- getchar can only read from the console (i.e. stdin), and you seem to be pretty clear that you want to deal with a file. This means that, for us, we're trying to figure out whether you do want the file, or you want getchar/putchar instead, or is there a reason you think getchar/putchar would come up here.... It's possible that you're just reaching for the wrong word/function name and muddying the waters a bit, or just misunderstanding what getchar does and don't realize it's not suitable, but it's hard to tell what exactly is going on.

    It sounds below that you got things working the way you want them though, which is great!

  13. #13
    Registered User
    Join Date
    Oct 2018
    Posts
    30
    Kernelpanic, for me it works perfectly in all cases. If NO word it works, If one word it works, if one word on 9 lines it works. If four of the same word on one line with another word inbetween them .. EVEN with no spaces, it works!

    I compile code with cc and the clang compiler and they both work:

    0 occurrences of 'remove' removed successfully.
    1 occurrences of 'remove' removed successfully.
    9 occurrences of 'remove' removed successfully.
    4 occurrences of 'remove' removed successfully.

    It's a Miracle!

    The original author: C Program to Remove given Word from a String - Sanfoundry


    Thank you laserlight

    I’ll never forget.
    Last edited by fat32; 11-06-2018 at 01:17 PM.

  14. #14
    Registered User Kernelpanic's Avatar
    Join Date
    Sep 2018
    Location
    Berlin
    Posts
    103
    Quote Originally Posted by fat32 View Post
    Kernelpanic, for me it works perfectly in all cases.
    Not with me.
    Code:
    /*
     * C program to copy text from a file to another file, without the given word
     * to remove. - By laserlight. - 6. Nov. 2018
     */
     
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <sys/stat.h>   //BUFSIZ 512, feste Gre
    
    
    /* Configuration variables */
    #define INPUT_FILENAME "3.txt"
    #define OUTPUT_FILENAME "2.txt"
    #define WORD_TO_REMOVE "Wahnsinn"
    #define VERBOSE 1
    How to remove all occurrences of a WORD from a FILE in C-singleword-jpg

    Code:
    /*
     * C program to copy text from a file to another file, without the given word
     * to remove. - By laserlight. - 6. Nov. 2018
     */
     
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <sys/stat.h>   //BUFSIZ 512, feste Gre
    
    
    /* Configuration variables */
    #define INPUT_FILENAME "1.txt"
    #define OUTPUT_FILENAME "2.txt"
    #define WORD_TO_REMOVE "Wahnsinn"
    #define VERBOSE 1
    How to remove all occurrences of a WORD from a FILE in C-textremoveok-jpg

    Let's see what @laserlight says.

    Hm, maybe I also understood something wrong? It should not appear in the output-file . . . then it also run correctly . . .
    Last edited by Kernelpanic; 11-06-2018 at 02:23 PM.

  15. #15
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    27,507
    Quote Originally Posted by Kernelpanic
    Is it intended that a single word in a text-file not be copied and then deleted? I get in this case a warning.
    You should end your input text file with a new line, just like you would with C source code. Anyway, it is just a warning: even in an actual case where the line is too long for the buffer, the word to remove might not be spread across the end of the buffer for this read and the start of the buffer for the next read.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Remove uppercase case letters from a word
    By Sid_TheBeginner in forum C Programming
    Replies: 12
    Last Post: 10-25-2012, 09:05 PM
  2. Replies: 28
    Last Post: 10-23-2011, 07:17 PM
  3. Remove all occurrences of character from string
    By Scotty33 in forum C Programming
    Replies: 14
    Last Post: 09-27-2011, 04:32 AM
  4. Counting occurrences of a word in a string
    By mrodgers in forum C Programming
    Replies: 3
    Last Post: 03-14-2010, 11:31 AM

Tags for this Thread