This is perhaps a duplicate question, but I didn't find anything that would be helpful for me.
Look, I have a string (actually that's command string) that is looking like
command arg1 "arg2 with whitespaces but enclosed with quotes"
.
So I need to parse it, construct an array or arguments - something like {"arg1", "arg2 with whitespaces but enclosed with quotes"}
There's no way to do so with a simple split - quote-enclosed argument may be with spaces so split will consider them "arguments" too.
Any libs, or something else helpful relate to this?