HTMLify
Day 123
Views: 2 | Author: djdj
1 2 3 4 5 6 7 8 9 10 11 12 13 | class Solution { /** * @param String $s * @return Integer */ function lengthOfLastWord($s) { $t = trim($s); $ex = explode(' ',$t); $l = end($ex); return strlen($l); } } |