[GRASS5] G_string_replace ()?

Markus Neteler neteler at itc.it
Wed Mar 10 09:24:07 EST 2004

Dear developers,

to enhance the HTML file creation in 5.7, I need
a function which replaces a string with another
string in a buffer. Something like

char * G_strchg(char* bug, char character, char new) {
 /* replace all occurencies of "character" in string(bug) with
  * "new", returns new string */

but which generally does:
 G_string_replace (buffer, oldstring, newstring);

Example: I have to replace replace:
 G_string_replace (opt->options, '\n', '<br>');

Is there anyone willing/able to provide such function?

Thanks in advance,


More information about the grass-dev mailing list