More performant Str.samecase