private static final StrMatcher SPLIT_MATCHER = new CharSetMatcher(" \t\n\r\f".toCharArray()); private static final StrMatcher QUOTE_MATCHER = new CharSetMatcher("'\"".toCharArray());
private static final StrMatcher SPLIT_MATCHER = new CharSetMatcher(" \t\n\r\f".toCharArray()); private static final StrMatcher QUOTE_MATCHER = new CharSetMatcher("'\"".toCharArray());
private static final StrMatcher SPLIT_MATCHER = new CharSetMatcher(" \t\n\r\f".toCharArray()); private static final StrMatcher QUOTE_MATCHER = new CharSetMatcher("'\"".toCharArray());
private static final StrMatcher SPLIT_MATCHER = new CharSetMatcher(" \t\n\r\f".toCharArray()); private static final StrMatcher QUOTE_MATCHER = new CharSetMatcher("'\"".toCharArray());
/** * Constructor that creates a matcher from a string representing a set of characters. * * @param chars the characters to match, null or empty matches nothing * @return a new Matcher for the given characters */ public static StrMatcher charSetMatcher(final String chars) { if (StringUtils.isEmpty(chars)) { return NONE_MATCHER; } if (chars.length() == 1) { return new CharMatcher(chars.charAt(0)); } return new CharSetMatcher(chars.toCharArray()); }
/** * Constructor that creates a matcher from a string representing a set of characters. * * @param chars the characters to match, null or empty matches nothing * @return a new Matcher for the given characters */ public static StrMatcher charSetMatcher(final String chars) { if (StringUtils.isEmpty(chars)) { return NONE_MATCHER; } if (chars.length() == 1) { return new CharMatcher(chars.charAt(0)); } return new CharSetMatcher(chars.toCharArray()); }
/** * Constructor that creates a matcher from a string representing a set of characters. * * @param chars the characters to match, null or empty matches nothing * @return a new Matcher for the given characters */ public static StrMatcher charSetMatcher(final String chars) { if (StringUtils.isEmpty(chars)) { return NONE_MATCHER; } if (chars.length() == 1) { return new CharMatcher(chars.charAt(0)); } return new CharSetMatcher(chars.toCharArray()); }
/** * Constructor that creates a matcher from a set of characters. * * @param chars the characters to match, null or empty matches nothing * @return a new matcher for the given char[] */ public static StrMatcher charSetMatcher(final char... chars) { if (chars == null || chars.length == 0) { return NONE_MATCHER; } if (chars.length == 1) { return new CharMatcher(chars[0]); } return new CharSetMatcher(chars); }
/** * Constructor that creates a matcher from a set of characters. * * @param chars the characters to match, null or empty matches nothing * @return a new matcher for the given char[] */ public static StrMatcher charSetMatcher(final char... chars) { if (chars == null || chars.length == 0) { return NONE_MATCHER; } if (chars.length == 1) { return new CharMatcher(chars[0]); } return new CharSetMatcher(chars); }
/** * Constructor that creates a matcher from a set of characters. * * @param chars the characters to match, null or empty matches nothing * @return a new matcher for the given char[] */ public static StrMatcher charSetMatcher(final char... chars) { if (chars == null || chars.length == 0) { return NONE_MATCHER; } if (chars.length == 1) { return new CharMatcher(chars[0]); } return new CharSetMatcher(chars); }
/** * Constructor that creates a matcher from a set of characters. * * @param chars the characters to match, null or empty matches nothing * @return a new matcher for the given char[] */ public static StrMatcher charSetMatcher(final char... chars) { if (chars == null || chars.length == 0) { return NONE_MATCHER; } if (chars.length == 1) { return new CharMatcher(chars[0]); } return new CharSetMatcher(chars); }
/** * Constructor that creates a matcher from a string representing a set of characters. * * @param chars the characters to match, null or empty matches nothing * @return a new Matcher for the given characters */ public static StrMatcher charSetMatcher(final String chars) { if (StringUtils.isEmpty(chars)) { return NONE_MATCHER; } if (chars.length() == 1) { return new CharMatcher(chars.charAt(0)); } return new CharSetMatcher(chars.toCharArray()); }