The function seems to work correctly for all the words I've tested, so there doesn't appear to be any part of the domain where the rule does not hold. The domain of the function appears to be all words.

Is there anything else I can help with?