--- Begin Message ---
This might do the trick:
(Number readFrom: ('8.524.757' copyReplaceAll: '.' with: '')) asIntegeror even 
nicer (and simpler)
('8.524.757' reject: [:char | char == $.]) asInteger
 -----------------
Benoit St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)
      From: Offray Vladimir Luna Cárdenas <off...@riseup.net>
 To: Any question about pharo is welcome <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



  

--- End Message ---

Reply via email to