JString::strcspn

UTF-8 aware alternative to strcspn Find length of initial segment not matching mask