strcspn from cstring