escape `{` in cmd for deprecated `Substring(std::string...)`