--- jlscp/trunk/src/org/linuxsampler/lscp/Parser.java 2007/05/24 14:22:39 1201 +++ jlscp/trunk/src/org/linuxsampler/lscp/Parser.java 2007/05/24 20:17:25 1202 @@ -156,17 +156,26 @@ return far; } - /** * Parses a comma separated list whose items are encapsulated into apostrophes. - * * @param list The comma separated list. * @return A String array containing all items in the list. - * * @throws LscpException if the list is broken. */ protected static String[] parseStringList(String list) throws LscpException { + return parseStringList(list, ','); + } + + /** + * Parses a list whose items are encapsulated into apostrophes. + * @param list The list of strings. + * @param separator Provides the character used as separator. + * @return A String array containing all items in the list. + * @throws LscpException if the list is broken. + */ + protected static String[] + parseStringList(String list, char separator) throws LscpException { if(list == null || list.length() == 0) return new String[0]; int q1 = 0, q2 = 0; Vector v = new Vector(); @@ -180,7 +189,7 @@ if(q2 + 1 >= list.length()) break; - if(list.charAt(q2 + 1) != ',') + if(list.charAt(q2 + 1) != separator) throw new LscpException(LscpI18n.getLogMsg("Parser.brokenList!")); q1 = q2 + 2; if(q1 >= list.length())