When using the battle.net API amounts of currency (like how much money you have, or how much a buyout for an auction item is) are displayed as a simple amount of copper (example: 174056); And that's not human readable.
So, I made a little baby function to format into either g s c or the padded version (adds a 0 in front of silver and copper if it's a single digit).
Hope someone needs this eventually :)
wowCur(174009, false);
= 74g 40s 9c
wowCur(174009, false, true);
= 74g 40s 09c
wowCur(174009, "g", true);
= 74g
wowCur(174009, "s", true);
= 40s
wowCur(174009, "c", true);
= 09c
wowCur(14862094667, false, true, true);
= 14,862,094g 46s 67c
wowCur(14862094667, false, true);
= 14862094g 46s 67c