libc: memchar support