Draft: Fix using a reference for the value returned by std::string::substr()
std::string::substr() returns a new string temporary, so assigning it to a reference causes undefined behavior
std::string::substr() returns a new string temporary, so assigning it to a reference causes undefined behavior