Posted By

miceno on 03/10/11


Tagged

String integer conversion


Versions (?)

String to Integer


 / Published in: Groovy
 

Print each char of an UTF-8 string as an Integer

  1. // UTF-8 chars are represented with as much as 4 Integers
  2. String s= "aeiouáéíóú"
  3.  
  4. s.each{
  5. def value= it.toCharacter() as Integer
  6. println value
  7. }

Report this snippet  

You need to login to post a comment.