List of usage examples for com.liferay.portal.kernel.util StringUtil indexOfAny
public static int indexOfAny(String s, String[] texts, int fromIndex)
From source file:com.liferay.exportimport.content.processor.base.BaseTextExportImportContentProcessor.java
License:Open Source License
protected void deleteTimestampParameters(StringBuilder sb, int beginPos) { beginPos = sb.indexOf(StringPool.CLOSE_BRACKET, beginPos); if ((beginPos == -1) || (beginPos == (sb.length() - 1)) || (sb.charAt(beginPos + 1) != CharPool.QUESTION)) { return;//from w w w . j av a2s .c o m } int endPos = StringUtil.indexOfAny(sb.toString(), DL_REFERENCE_LEGACY_STOP_CHARS, beginPos + 2); if (endPos == -1) { return; } String urlParams = sb.substring(beginPos + 1, endPos); urlParams = HttpUtil.removeParameter(urlParams, "t"); sb.replace(beginPos + 1, endPos, urlParams); }
From source file:com.liferay.exportimport.internal.content.processor.DLReferencesExportImportContentProcessor.java
License:Open Source License
protected void deleteTimestampParameters(StringBuilder sb, int beginPos) { beginPos = sb.indexOf(StringPool.CLOSE_BRACKET, beginPos); if ((beginPos == -1) || (beginPos == (sb.length() - 1)) || (sb.charAt(beginPos + 1) != CharPool.QUESTION)) { return;/*from w ww .j av a2 s .c o m*/ } int endPos = StringUtil.indexOfAny(sb.toString(), _DL_REFERENCE_LEGACY_STOP_CHARS, beginPos + 2); if (endPos == -1) { return; } String urlParams = sb.substring(beginPos + 1, endPos); urlParams = _http.removeParameter(urlParams, "t"); sb.replace(beginPos + 1, endPos, urlParams); }