List of usage examples for com.liferay.portal.kernel.util StringUtil indexOfAny
public static int indexOfAny(String s, String[] texts)
From source file:com.liferay.exportimport.internal.content.processor.test.DefaultExportImportContentProcessorTest.java
License:Open Source License
protected String replaceMultiLocaleLayoutFriendlyURLs(String content) { if (StringUtil.indexOfAny(content, _MULTI_LOCALE_LAYOUT_VARIABLES) <= -1) { return content; }/*from www .j a v a 2s.c o m*/ List<String> urls = ListUtil.toList(StringUtil.splitLines(content)); List<String> outURLs = new ArrayList<>(); for (String url : urls) { outURLs.add(url); if (StringUtil.indexOfAny(url, _MULTI_LOCALE_LAYOUT_VARIABLES) > -1) { outURLs.add(StringUtil.replace(url, _MULTI_LOCALE_LAYOUT_VARIABLES, _NON_DEFAULT_MULTI_LOCALE_LAYOUT_VARIABLES)); } } return StringUtil.merge(outURLs, StringPool.NEW_LINE); }