UTF-8 aware alternative to strcspn
Find length of initial segment not matching mask Note: requires utf8_strlen and utf8_substr (if start, length are used)