This also fixes an issue introduced in rBd3e8d63a8c455d0, where the function relied on the `StringRef` being null-terminated.
This also fixes an issue introduced in rBd3e8d63a8c455d0, where the function relied on the `StringRef` being null-terminated.