Return to Snippet

Revision: 24984
at March 17, 2010 10:35 by adrianparr


Initial Code
function getLastCharInString($s:String):String
{
	return $s.substr($s.length-1,$s.length);
}

trace(getLastCharInString("abcdefg"));

// OUTPUT
// g

Initial URL

                                

Initial Description
Returns the last character is a string.

Initial Title
AS3 Get the Last Char in a String

Initial Tags

                                

Initial Language
ActionScript 3