strdel man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

STRDEL(3)		     C Programmer's Manual		     STRDEL(3)

NAME
       strdel - delete characters from beginning of string

SYNOPSIS
       #include <publib.h>
       char *strdel(char *s, size_t n);

DESCRIPTION
       strdel  removes	the first n characters of s.  If n is greater than the
       length of the string, all characters in the string (not counting	 '\0')
       are removed but no more.

RETURN VALUE
       strdel returns its first argument.

EXAMPLE
       To change all occurences of "Pascal" in the input to "Yuck!", you might
       do the following:

	    #include <string.h>
	    #include <stdio.h>
	    #include <publib.h>

	    int main(void) {
		 char line[512];

		 while (fgets(line, sizeof(line), stdio) != NULL) {
		      while ((p = strstr(line, "Pascal")) != NULL) {
			   strdel(p, 6);
			   strins(p, "Yuck!");
		      }
		      printf("%s", line);
		 }
		 return 0;
	    }

SEE ALSO
       publib(3), strins(3)

AUTHOR
       Lars Wirzenius (lars.wirzenius@helsinki.fi)

Publib			     C Programmer's Manual		     STRDEL(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net