[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Function            strdel - delete part of a string

  Syntax              char *strdel(char *source, char *old);

  Prototype in        stringhk.h

  Remarks             strdel deletes the first occurence of the string
                      old from the string source. This function is case
                      dependent.

  Return value        returns source

  Example             #include <stringhk.h>
                      #include <stdio.h>            /* for the printf */

                      main()
                      {
                           char msg[45], fragment[15], *new;

                           strcpy(msg,"Did you register yet? Did you?");
                           strcpy(fragment,"you");
                           printf("  [%s]\n",msg);
                           printf("- [%s]\n",fragment);
                           new = strdel(msg,fragment);
                           printf("= [%s]\n",new);
                      }

  Program output        [Did you register yet? Did you?]
                      - [you]
                      = [Did  register yet? Did you?]


See Also: strins()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson