How to converted string with space in double quoted string. For Example: I get string
c:\program files\abc.bat
I want to convert this string to "c:\program files\abc.bat" but only if there is space in the string.
Assuming the STL string s contains the string you want to check for a space:
if (s.find(' ') != std::string::npos)
{
s = '"' + s + '"';
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With