strings are assumed to be 0-terminated