List of usage examples for org.apache.commons.lang3 StringUtils split
public static String[] split(final String str, final String separatorChars)
Splits the provided text into an array, separators specified.
From source file:com.squarespace.template.Arguments.java
/** * Parses the raw string into a list of arguments. *//* w w w. j av a2s.co m*/ private void parse(StringView raw) { if (raw == null || raw.length() == 0) { return; } delimiter = raw.charAt(0); raw = raw.subview(1, raw.length()); args = Arrays.asList(StringUtils.split(raw.repr(), delimiter)); }
From source file:com.rometools.propono.atom.server.impl.FileBasedAtomHandler.java
/** * Returns null because we use in-line categories. * * @throws com.rometools.rome.propono.atom.server.AtomException Unexpected exception. * @return Categories object//w w w .j a v a 2 s . com */ @Override public Categories getCategories(final AtomRequest areq) throws AtomException { LOG.debug("getCollection"); final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); final String handle = pathInfo[0]; final String collection = pathInfo[1]; final FileBasedCollection col = service.findCollectionByHandle(handle, collection); return col.getCategories(true).get(0); }