protected function applyRule($word, $rule)
    {
        return substr_replace($word, $rule[self::APPEND_STRING], strlen($word) - $rule[self::REMOVE_TOTAL]);        
    }
protected function applyRule($word, $rule)
    {
        return substr_replace($word, $rule[self::APPEND_STRING], strlen($word) - $rule[self::REMOVE_TOTAL]);        
    }
protected function applyRule ( $ word , $ rule ) { return substr_replace ( $ word , $ rule [ self :: APPEND_STRING ] , strlen ( $ word ) - $ rule [ self :: REMOVE_TOTAL ] ) ; }
Apply the lancaster rule and return the altered string.
@param string $word word the rule is being applied on
@param array $rule An associative array containing all the data elements for applying to the word
Apply the lancaster rule and return the altered string .