Use strncmp for prefix check.