Smart Splitter
Split strings the smarter way.
Why?
A developer might parse arguments using String#split
, but this falls apart as soon as multi-word arguments need to be parsed:
"--force -m hey!"; // It works..."--force -m 'hello world'"; // Nope: [..., "'hello", "world'"]
Smart Splitter aims to solve this problem. Quoted text remains as one string and does not contain quotes:
; // Nice: ["--force", "-m", "hello world"]