Posted By

miceno on 03/10/11


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áéíóú"
  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.