Comment Comment by codehero Efficiency looks past current deficiency.We have the empty string: "\0"We have the null string: NULLThere is no concept of an INVALID string, as float has NAN.This would be the result of trying to copy a string to a buffer that is too small.Or sprintf() into a small buffer.Or a raw string parsed as UTF-8 and is invalid.Correctness over efficiency. parent codehero 7 years ago
We have the empty string: "\0"
We have the null string: NULL
There is no concept of an INVALID string, as float has NAN.
This would be the result of trying to copy a string to a buffer that is too small.
Or sprintf() into a small buffer.
Or a raw string parsed as UTF-8 and is invalid.
Correctness over efficiency.