我希望有以下字符串!cmd 45 90 "An argument" Another AndAnother "Another one in quotes"成为以下的数组{ "!cmd", "45", "90", "An argument", "Another", "AndAnother", "Another one in quotes" }我试过了new StringTokenizer(cmd, "\"")但这会返回“ Another”和“ AndAnother”作为“ Another AndAnother”,这并不是理想的效果。谢谢。编辑:我再次更改了示例,这次我相信它可以最好地说明情况,尽管它与第二个示例没有什么不同。
添加回答
举报
0/150
提交
取消