In practice, GCC and Clang don't seem to have any issues inlining the necessary part of strlen at -O1 or higher (
https://godbolt.org/z/rM198aYea). But MSVC inlines the empty-string case, while still calling out for nonempty strings, probably since it doesn't realize that the returned length will be nonzero.