Re: Posix(?) on numeric entry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



antongiulio wrote:
[...]
buffer = g_strdup_printf("%g", value);
[...]
this value appears like: 2,59787 where ',' replaces a '.'
I suppose it's related to *_NL locale replaces posix locale.
How can I replace ',' with dot notation?
Hi,
Consider g_ascii_dtostr() function:
http://developer.gnome.org/doc/API/2.0/glib/glib-String-Utility-Functions.html#g-ascii-dtostr

Note that it doesn't allocate a memory for you, you need to provide a buffer.

	Olexiy

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux