Autowrapped text, centered?

I found this function which autowraps long texts, it works great but I would like to be able to center each row of text.
http://developer.anscamobile.com/code/auto-wrapped-text-updated#comment-52493

Is it possible to change something in this code? I’ve been trying several different solutions without manage to center each line like this:

 this is line one
     line two
this is line three

[import]uid: 35378 topic_id: 14414 reply_id: 314414[/import]

I figured it out:
Put this line of code after each local newDisplayLine

newDisplayLine.x = width/2 - newDisplayLine.width/2; [import]uid: 35378 topic_id: 14414 reply_id: 53348[/import]