[4.2] Suport Str : minor tweak

words : no need to used 2 separate conditions
snake : `$replace` does not need to be set that early
Using `===` here rather than `==` would be faster, and indeed safer too.