/ Published in: ActionScript 3

Returns the last character is a string.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function getLastCharInString($s:String):String { return $s.substr($s.length-1,$s.length); } trace(getLastCharInString("abcdefg")); // OUTPUT // g
Comments
