Quoted string function
-
It would be helpful if there was a meta function that would correctly return a quoted string for use mainly as part of an echo >> command or where you are passing an object model value as a parameter.
In Delphi there is quotedStr(myString)
I don't know if there's an equivalent C/C++ function that could be easily exposed?
At present you have to concatenate strings and work out how many double quotes to use to get the desired output.So instead of
echo >>"/sys/lib/led/sb_leds-restore.g" "set global.sb_leds ="^ """"^{global.sb_leds}^""""We would have
echo >>"/sys/lib/led/sb_leds-restore.g" "set global.sb_leds =" ^ quotedStr({global.sb_leds})