[GRASS5] G_string_replace ()?
Thierry Laronde
tlaronde at polynum.com
Wed Mar 10 11:05:54 EST 2004
FWIW, for string manipulations (and for OSes not supporting awk just
provide an already "digest" version) simply use:
cat old_file | awk 'BEGIN { ORS="<br>";} {print;}' > new_file
Cheers.
On Wed, Mar 10, 2004 at 03:24:07PM +0100, Markus Neteler wrote:
> 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
>
> lib/gis/strings.c
> 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,
>
> Markus
>
> _______________________________________________
> grass5 mailing list
> grass5 at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5
--
Thierry Laronde (Alceste) <tlaronde at polynum.org>
Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C
More information about the grass-dev
mailing list