private function lookBehind(array $charArray, int $currPosition)
    {
        if ($currPosition === 0 || count($charArray) === 0) {
            return null;
        }

        return $charArray[$currPosition - 1];
    }
private function lookBehind(array $charArray, int $currPosition)
    {
        if ($currPosition === 0 || count($charArray) === 0) {
            return null;
        }

        return $charArray[$currPosition - 1];
    }
private function lookBehind ( array $ charArray , int $ currPosition ) { if ( $ currPosition === 0 || count ( $ charArray ) === 0 ) { return null ; } return $ charArray [ $ currPosition - 1 ] ; }
Looks back at the previous character in the string

@param array $charArray The char array
@param int $currPosition The current position
@return string|null The previous character if there is one, otherwise null
Looks back at the previous character in the string