flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mark goldin <markzolo...@gmail.com>
Subject Re: Currency value
Date Sun, 13 Jul 2014 15:27:38 GMT
Try any currency (Euro) which has a currency symbol at the end of the value.


On Sun, Jul 13, 2014 at 9:28 AM, Deepak MS <megharajdeepak@gmail.com> wrote:

> I believe currency string here you meant was using currencyformatter?
>
>                 var value:int = 893829;
>                 var cf:CurrencyFormatter = new CurrencyFormatter();
> //import spark.formatters.CurrencyFormatter;
>                 cf.currencySymbol = '$';
>                 cf.useCurrencySymbol = true;
>                 var s:String = cf.format(value); // s =  $893,829.00
>                 var cfr:CurrencyParseResult = cf.parse(s);
> //cfr.currencyString     = "$"  ,     cfr.value     = 893829
>
> "but it only works well with currencies which have a
> currency symbol in the front."
> - I'm not clear on this. Currency formatting would be used with currency
> symbol. If you dont need currency symbol, you can go for NumberFormatter,
> which has parseNumber method.
>
>
> On Sun, Jul 13, 2014 at 2:24 AM, mark goldin <markzolotoy@gmail.com>
> wrote:
>
> > Is there a reliable way of extracting a value from a currency string?
> > I am using parse, but it only works well with currencies which have a
> > currency symbol in the front.
> >
> > Thanks
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message