Monday, December 19, 2016

Monkey-X - Beginners - String - ToChars - code example

Import mojo

Class MyGame Extends App
    Method OnCreate()
        ' create a array with array with the character codes of each
        ' character in a string.
        Local a:Int[]
        Local b:String="abcdefghijklmnopqrstuvwxyz"
        a = b.ToChars()
        Local deb:String
        For Local i=0 Until a.Length
        DebugLog deb
    End Method
    Method OnUpdate()
    End Method
    Method OnRender()
    End Method
End Class

Function Main()
    New MyGame()
End Function

No comments:

Post a Comment