Prev | Current Page 154 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


split(delimiter : String) :
Array
Splits a string into an Array from a given
delimiter character or string.
substr(pos : Int, ?len : Int) : String Returns a section of a string.
toLowerCase() : String Returns the string in all lowercase characters.
toUpperCase() : String Returns the string in all uppercase characters.
toString() : String Returns a string representation of the string.
static fromCharCode(code : Int) : String Converts the passed numeric code into an
equivalent character.
Chapter 3: Learning the Basics
67
Extracting Characters from a String
Accessing characters at a particular location of a string Array is performed using the charAt ,
charCodeAt , and substr methods. The charAt and charCodeAt methods can return a single character
from a string at a given location; charAt would return its character representation as String , while the
charCodeAt would return its ASCII representation as an Int . The substr method accepts a second
parameter, which determines the length of the string of characters to return.


Pages:
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166