From: Bob D. <bd...@si...> - 2003-12-10 17:51:30
|
Hey All, If you know anything about i18n or english is not your first language please read this: A little while ago Everton noticed a problem w/ rlib formatting numbers.. right now rlib can "commatize" a number.. but this doesn't work out too well for other number systems or currency's So... I went digging around and in C I found strfmon #include <monetary.h> ssize_t strfmon(char *s, size_t max, const char *format, ...); Which looks like it will do the trick.... along w/ a rlib_set_locale so I think I'm going to have to change around the structure of format="" Currently you can do a "%s" or "%d" or.. all the fun date stuff depending on weather your data is STRING, DATE or NUMBER However.. the syntax for strfmon is kinda screwey.... sample format string: [%^=*#6n] so for numbers I think I'm going to do this: %d and %m and only one can be in the format string.. %d for numbers.. and %m for money and %m would have %m and %!m where the ! means omit the currency symbol... and %^m would me omit the grouping symbol.. ofcourse you could do: %!^m Sound good to everyone? - Bob |