is there an equivalent of sscanf that uses GString as arguments?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

is there an equivalent of sscanf that uses GString as arguments?

Yiannis-6
Hi, is there an equivalent of sscanf that uses GString as arguments?
--
-- Yiannis
_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: is there an equivalent of sscanf that uses GString as arguments?

Tim-Philipp Müller
On Fri, 2005-10-14 at 18:11 +0100, Yiannis wrote:

> is there an equivalent of sscanf that uses GString as arguments?

You could just do

 sscanf (gstring->str, "%04u-%02u-%02u", ......);

Cheers
 -Tim


_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: is there an equivalent of sscanf that uses GString as arguments?

Yiannis-6
On 14/10/05, Tim Müller <[hidden email]> wrote:
> On Fri, 2005-10-14 at 18:11 +0100, Yiannis wrote:
>
> > is there an equivalent of sscanf that uses GString as arguments?
>
> You could just do
>
>  sscanf (gstring->str, "%04u-%02u-%02u", ......);
Cheers but let me clarify that... I was wondering if there was an
sscanf to do the following.... although I dont have to worry about
resizing the gchar*.
sscanf(buf->str, "%[^ =\n]%*[ =]%[^\n]", tag, value);
where tag, value would be GStrings.
>
> Cheers
>  -Tim
>
>
>


--
-- Yiannis
_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list