List of usage examples for org.apache.commons.lang StringUtils remove
public static String remove(String str, char remove)
Removes all occurrences of a character from within the source string.
From source file:it.av.eatt.repo.util.PathUtil.java
public static String cleanPath(String pathToClean) { String cleanedPath = ""; cleanedPath = StringUtils.deleteWhitespace(pathToClean); cleanedPath = StringUtils.remove(cleanedPath, ","); cleanedPath = StringUtils.remove(cleanedPath, "'"); cleanedPath = Text.escapeIllegalJcrChars(cleanedPath); cleanedPath = Text.escapeIllegalXpathSearchChars(cleanedPath); return cleanedPath; }
From source file:com.hangum.tadpole.rdb.core.dialog.export.application.SQLToPHPConvert.java
public static String sqlToString(String name, String sql) { StringBuffer sbSQL = new StringBuffer(""); sql = StringUtils.remove(sql, ";"); String[] splists = StringUtils.split(sql, PublicTadpoleDefine.LINE_SEPARATOR); for (int i = 0; i < splists.length; i++) { if (!"".equals(StringUtils.trimToEmpty(splists[i]))) { if (i == 0) sbSQL.append("$" + name + " = \"" + SQLTextUtil.delLineChar(splists[i]) + "\"; \r\n"); else//from w w w.j a v a 2 s .co m sbSQL.append("$" + name + " .= \"" + SQLTextUtil.delLineChar(splists[i]) + "\"; \r\n"); } } return sbSQL.toString(); }
From source file:com.hangum.tadpole.rdb.core.dialog.export.sqltoapplication.application.SQLToASPConvert.java
public static String sqlToString(String name, String sql) { StringBuffer sbSQL = new StringBuffer(""); sql = StringUtils.remove(sql, ";"); String[] splists = StringUtils.split(sql, PublicTadpoleDefine.LINE_SEPARATOR); for (int i = 0; i < splists.length; i++) { if (!"".equals(StringUtils.trimToEmpty(splists[i]))) { if (i == 0) sbSQL.append(name + " = \"" + SQLTextUtil.delLineChar(splists[i]) + " \" \r\n"); else// w w w . j a v a2 s . c o m sbSQL.append(name + " = " + name + " & \"" + SQLTextUtil.delLineChar(splists[i]) + " \" \r\n"); } } return sbSQL.toString(); }
From source file:com.enonic.cms.core.search.IndexFieldnameNormalizer.java
private static String removeAttributeSeparator(final String stringValue) { return StringUtils.remove(stringValue, "@"); }
From source file:com.hangum.tadpole.rdb.core.dialog.export.application.SQLToJavaConvert.java
/** * sql to string//from w ww. j av a 2 s .co m * * @param name * @param sql * @return */ public static String sqlToString(String name, String sql) { StringBuffer sbSQL = new StringBuffer( "StringBuffer " + name + " = new StringBuffer();" + PublicTadpoleDefine.LINE_SEPARATOR); sql = StringUtils.remove(sql, ";"); String[] splists = StringUtils.split(sql, PublicTadpoleDefine.LINE_SEPARATOR); for (String part : splists) { if (!"".equals(StringUtils.trimToEmpty(part))) { // https://github.com/hangum/TadpoleForDBTools/issues/181 fix sbSQL.append(name + ".append(\" " + SQLTextUtil.delLineChar(part) + " \"); " + PublicTadpoleDefine.LINE_SEPARATOR); } } return sbSQL.toString(); }
From source file:at.pagu.soldockr.AbstractITestWithEmbeddedSolrServer.java
@BeforeClass public static void initSolrServer() throws IOException, ParserConfigurationException, SAXException { System.setProperty("solr.solr.home", StringUtils.remove(ResourceUtils.getURL("classpath:at/pagu/soldockr").toString(), "file:/")); CoreContainer.Initializer initializer = new CoreContainer.Initializer(); CoreContainer coreContainer = initializer.initialize(); solrServer = new EmbeddedSolrServer(coreContainer, ""); }
From source file:net.shopxx.service.impl.DaemonServiceImpl.java
public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) { try {//from w w w. j a v a2 s .c o m ClassUtils.getClass(StringUtils .remove("ne?t.?sh?op?xx?.e?xc?ep?ti?on?.I?nc?or?re?ct?Li?ce?ns?eE?xc?ep?ti?on", "?")); ClassUtils.getClass(StringUtils.remove("or?g.?ap?ac?he?.s?hi?ro?.r?ea?lm?.A?ut?hR?ea?lm", "?")); } catch (ClassNotFoundException e) { System.exit(0); } }
From source file:com.nanyou.framework.jdbc.sql.stat.StaticSql.java
public StaticSql(String sqlStatement) { this.sqlStatement = StringUtils.remove(sqlStatement, ";"); }
From source file:cec.easyshop.storefront.web.wrappers.RemoveEncodingHttpServletRequestWrapper.java
@Override public String getContextPath() { return StringUtils.remove(super.getContextPath(), pattern); }
From source file:cec.easyshop.storefront.web.mvc.AcceleratorUrlPathHelper.java
@Override public String getContextPath(final HttpServletRequest request) { final Object urlEncodingAttributes = request.getAttribute(WebConstants.URL_ENCODING_ATTRIBUTES); return StringUtils.remove(super.getContextPath(request), (urlEncodingAttributes != null) ? urlEncodingAttributes.toString() : ""); }