This is consistent with other standard library functions working with null terminated pointers/slices.