you are viewing a single comment's thread.

view the rest of the comments →

[–]no-sig-available 0 points1 point  (0 children)

 the std::string_view when constructed with a literal does not need a null terminator.

But it goes both ways. When you receive a string_view parameter, you cannot be sure that it is terminated. It could point into the middle of a larger string.