Factorize some code into the new function ff_toupper4().