[Vala] double to string without localization



Hi,

I want to format a double to a string using an enforced dot (no comma) as decimal separator despite enabled localization after calling Gtk.init().

Both double.to_string() and string.printf() have localized results.

I'm missing the functions g_ascii_dtostr() and g_ascii_formatd().

http://library.gnome.org/devel/glib/stable/glib-String-Utility-Functions.html#g-ascii-dtostr
http://library.gnome.org/devel/glib/stable/glib-String-Utility-Functions.html#g-ascii-formatd

The documentation says:
"Converts a gdouble to a string, using the '.' as decimal point."

Or is there any other way to achieve this?


Best Regards,

Frederik



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