20 package net.sf.gridarta.utils;
22 import java.util.ArrayList;
23 import java.util.List;
24 import java.util.prefs.Preferences;
26 import org.jetbrains.annotations.NotNull;
92 public static void setServer(@NotNull
final CharSequence server) {
100 public static void setClient(@NotNull
final CharSequence client) {
145 public static List<String>
splitCommand(@NotNull
final String command) {
146 final char[] s = command.toCharArray();
148 while (pos < s.length && s[pos] ==
' ') {
151 final List<String> result =
new ArrayList<>();
152 while (pos < s.length) {
158 while (pos < s.length && s[pos] !=
'"') {
162 if (pos < s.length && s[pos] ==
'"') {
167 while (pos < s.length && s[pos] !=
' ') {
172 while (pos < s.length && s[pos] ==
' ') {
175 result.add(
new String(s, start, end - start));
177 if (result.isEmpty()) {