Thanks a lot it works like a charm! Cheers,
Offray El 04/04/15 a las 19:13, Cyril Ferlicot escribió:
If it's for the thousand you can use that: (myStringNumber copyWithoutAll: '.') asNumber To find this kind of methods you can use the finder (world -> Tools). You select "example" and you search for things like : '1.234'.'.'.'1234' and that will give you: '1.234' copyWithoutAll: '.' first -> '1234' -- Cheers Cyril Ferlicot On 5 April 2015 at 01:43, Benoit St-Jean via Pharo-users <pharo-users@lists.pharo.org <mailto:pharo-users@lists.pharo.org>> wrote: ---------- Forwarded message ---------- From: Benoit St-Jean <bstj...@yahoo.com <mailto:bstj...@yahoo.com>> To: Any question about pharo is welcome <pharo-users@lists.pharo.org <mailto:pharo-users@lists.pharo.org>> Cc: Date: Sat, 4 Apr 2015 23:40:01 +0000 (UTC) Subject: Re: [Pharo-users] Converting a string containing dots to integer Do you have more details? Such as, do you have values with more than one dot ? (e.g. 1.436.782) Do you have values with no dot? ----------------- Benoit St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux Pinterest: benoitstjean IRC: lamneth Blogue: endormitoire.wordpress.com <http://endormitoire.wordpress.com> "A standpoint is an intellectual horizon of radius zero". (A. Einstein) -------------------------------------------------------------------------------- *From:* Offray Vladimir Luna Cárdenas <off...@riseup.net <mailto:off...@riseup.net>> *To:* Any question about pharo is welcome <pharo-users@lists.pharo.org <mailto:pharo-users@lists.pharo.org>> *Sent:* Saturday, April 4, 2015 7:17 PM *Subject:* [Pharo-users] Converting a string containing dots to integer Hi all, I'm parsing some text which contains numbers like "8.324" and I would like to convert it to integer. The problem is that asNumber and asInteger don't make the trick because of the dot ("."), which is there to indicate thousands, not decimal values. Which is the proper message to send? Cheers, Offray