and also you have to copy (probably allocating) to get a substring.
This isn't as much a fault of a string_view type of mechanism, but rather API's wanting NULL terminated strings. Which are kind of hard to avoid on mainstream systems today, even at the syscall interface. Oh well..
But yeah, it would be nice if the kernel and POSIX APIs had better support for pointer+size strings.