final public static function lastCharacter($strString)
    {
        if (defined('QCUBED_ENCODING')) {
            $intLength = mb_strlen($strString, QCUBED_ENCODING);
            if ($intLength > 0) {
                return mb_substr($strString, $intLength - 1, 1, QCUBED_ENCODING);
            } else {
                return null;
            }
        } else {
            $intLength = strlen($strString);
            if ($intLength > 0) {
                return $strString[$intLength - 1];
            } else {
                return null;
            }
        }
    }
final public static function lastCharacter($strString)
    {
        if (defined('QCUBED_ENCODING')) {
            $intLength = mb_strlen($strString, QCUBED_ENCODING);
            if ($intLength > 0) {
                return mb_substr($strString, $intLength - 1, 1, QCUBED_ENCODING);
            } else {
                return null;
            }
        } else {
            $intLength = strlen($strString);
            if ($intLength > 0) {
                return $strString[$intLength - 1];
            } else {
                return null;
            }
        }
    }
final public static function lastCharacter ( $ strString ) { if ( defined ( 'QCUBED_ENCODING' ) ) { $ intLength = mb_strlen ( $ strString , QCUBED_ENCODING ) ; if ( $ intLength > 0 ) { return mb_substr ( $ strString , $ intLength - 1 , 1 , QCUBED_ENCODING ) ; } else { return null ; } } else { $ intLength = strlen ( $ strString ) ; if ( $ intLength > 0 ) { return $ strString [ $ intLength - 1 ] ; } else { return null ; } } }
Returns the last character of a given string, or null if the given
string is null.

@param string $strString

@return string the last character, or null
Returns the last character of a given string or null if the given string is null .