Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
replace_extension(3)		 Allegro manual 	    replace_extension(3)

NAME
     replace_extension	- Replaces filename+extension with a new extension tail.
     Allegro game programming library.

SYNOPSIS
     #include <allegro.h>

     char *replace_extension(char *dest, const char *filename, const char  *ext,
     int size);

DESCRIPTION
     Replaces  the specified filename+extension with a new extension tail, stor-
     ing at most `size' bytes into the `dest' buffer. If  the  filename  doesn't
     have any extension at all, `ext' will be appended to it, adding a dot char-
     acter  if	needed. You can use the same buffer both as input and output be-
     cause Allegro internally works on a  copy	of  the  input	before	touching
     `dest'. Example:

	replace_extension(buf, "C:\\game\\prog.exe",
			  "dat", sizeof(buf));

RETURN VALUE
     Returns a copy of the `dest' parameter.

SEE ALSO
     get_extension(3), replace_filename(3)

Allegro 			  version 4.4.3 	    replace_extension(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=replace_extension&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help