text: public static String[] stringToPath(String s) {List<String> parts = new ArrayList<>();int length = s.length();if (length == 0) {return new String[0];}char[] buffer = new char[length];int upto = 0;boolean lastEscape = false;for(int i=0;i<length;i++) {char ch = s.charAt(i);if (lastEscape) {buffer[upto++] = ch;lastEscape = false;} else if (ch == ESCAPE_CHAR) {lastEscape = true;} else if (ch == DELIM_CHAR) {parts.add(new String(buffer, 0, upto));upto = 0;} else {buffer[upto++] = ch;}}parts.add(new String(buffer, 0, upto));assert !lastEscape;return parts.toArray(new String[parts.size()]);}