Argument split with quotes

I’m working on a admin and I need to add an argument system that not only splits a command by spaces but allows spaces in a single arg if quotes are used. Similar to how you use the linux terminal.
Here’s an example:
Input:
Hello World "argument with spaces"
Output:
{"Hello","World","argument with spaces"}

Also it would be cool if you were able to type the quotes using backslashes without the program thinking that they are a spaced argument close/open character. Like:
"This is a \"spaced argument\" that uses \\ to write quotes"
Output:
This is a a "spaced argument" that uses \ to write quotes

3 Likes

This forum might help you with your problem.

You didnt say you wanted it in Lua.

Then how would you know that he wanted it in java?

he didnt specify, thats his default language.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.