News for hackers. Stuff that matters.
Re:Just how constexpr is C++20’s std:string? by criddell on Friday September 08, 2023 @05:46PM (#37439799)
I think you still need the length though unless you can guarantee the string will never have any nulls in it. In Windows, there are API calls that take strings with embedded nulls (and that are typically terminated with a two nulls in a row).

So you might need to deal with a string that looks like "foo\0bar\0\0".

There are no comments on this comment yet.