List of usage examples for org.apache.commons.lang StringUtils deleteWhitespace
public static String deleteWhitespace(String str)
Deletes all whitespaces from a String as defined by Character#isWhitespace(char) .
From source file:StringUtilsExampleV1.java
public static void main(String args[]) { System.err.println(StringUtils.deleteWhitespace("f f f f")); }
From source file:com.rslakra.java.string.TestApacheStringUtils.java
public static void main(String args[]) { System.err.println(StringUtils.abbreviate("Take time off working", 0, 10)); System.err.println(StringUtils.capitalize("vanderLust")); System.err.println(StringUtils.center("MTV", 7, '=')); System.err.println(StringUtils.chomp("temperature", "ure")); System.err.println(StringUtils.chop("Dane")); System.err.println(StringUtils.contains("Dorothy", "oro")); System.err.println(StringUtils.containsNone("r u m t", new char[] { 'r', 'o' })); System.err.println(StringUtils.containsOnly("r u m t", new char[] { 'r', 'o' })); System.err.println(StringUtils.countMatches("arthur", "r")); System.err.println(StringUtils.deleteWhitespace("f f f f")); System.err.println(StringUtils.difference("govern", "government")); System.err.println(StringUtils.getLevenshteinDistance("govern", "government")); }
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:cec.easyshop.storefront.security.cookie.CartRestoreCookieGenerator.java
@Override public String getCookieName() { return StringUtils.deleteWhitespace(getBaseSiteService().getCurrentBaseSite().getUid()) + "-cart"; }
From source file:cec.easyshop.storefront.security.cookie.CustomerLocationCookieGenerator.java
@Override public String getCookieName() { return StringUtils.deleteWhitespace(getBaseSiteService().getCurrentBaseSite().getUid()) + "-customerLocation"; }
From source file:com.hangum.tadpole.sql.util.tables.SQLHistoryFilter.java
@Override public boolean select(Viewer viewer, Object parentElement, Object element) { if (searchString == null || searchString.length() == 0) { return true; }// w w w . j a v a2 s . c o m SQLHistoryDAO sqlDAO = (SQLHistoryDAO) element; if (StringUtils.deleteWhitespace(sqlDAO.getStrSQLText()).toLowerCase().matches(searchString)) return true; if (("" + sqlDAO.getStartDateExecute()).toLowerCase().matches(searchString)) return true; if (("" + sqlDAO.getEndDateExecute()).toLowerCase().matches(searchString)) return true; if (sqlDAO.getMesssage().toLowerCase().matches(searchString)) return true; if (sqlDAO.getResult().toLowerCase().matches(searchString)) return true; if (("" + sqlDAO.getRows()).toLowerCase().matches(searchString)) return true; if (("" + sqlDAO.getUserName()).toLowerCase().matches(searchString)) return true; if (("" + sqlDAO.getDbName()).toLowerCase().matches(searchString)) return true; if (("" + sqlDAO.getIpAddress()).toLowerCase().matches(searchString)) return true; return false; }
From source file:com.hangum.tadpole.engine.sql.util.tables.SQLHistoryFilter.java
@Override public boolean select(Viewer viewer, Object parentElement, Object element) { if (searchString == null || searchString.length() == 0) { return true; }/* w ww .j av a 2s .c o m*/ RequestResultDAO sqlDAO = (RequestResultDAO) element; if (StringUtils.deleteWhitespace(sqlDAO.getStrSQLText()).toLowerCase().matches(searchString)) return true; if (("" + sqlDAO.getStartDateExecute()).toLowerCase().matches(searchString)) return true; if (("" + sqlDAO.getEndDateExecute()).toLowerCase().matches(searchString)) return true; if (sqlDAO.getMesssage().toLowerCase().matches(searchString)) return true; if (sqlDAO.getResult().toLowerCase().matches(searchString)) return true; if (("" + sqlDAO.getRows()).toLowerCase().matches(searchString)) return true; if (("" + sqlDAO.getUserName()).toLowerCase().matches(searchString)) return true; if (("" + sqlDAO.getDbName()).toLowerCase().matches(searchString)) return true; if (("" + sqlDAO.getIpAddress()).toLowerCase().matches(searchString)) return true; return false; }
From source file:de.griffel.confluence.plugins.plantuml.preprocess.PageAnchorBuilder.java
String generateAnchor(ConfluenceLink link) { if (!link.hasFragment()) { throw new IllegalArgumentException("Confluence w/o section: " + link); }/*from ww w. ja v a 2s. co m*/ final StringBuilder sb = new StringBuilder(); sb.append(link.getPageTitle()); sb.append("-"); sb.append(encodeFragment(link.getFragment())); final String result = "#" + UrlCoder.encode(StringUtils.deleteWhitespace(sb.toString())); return result; }
From source file:com.incapture.slate.model.node.ApiNode.java
public String getTrimmedTitle() { return StringUtils.deleteWhitespace(getTitle()).toLowerCase(); }
From source file:de.tsystems.mms.apm.performancesignature.model.ConfigurationTestCase.java
public ConfigurationTestCase(final String name, final List<Dashboard> singleDashboards, final List<Dashboard> comparisonDashboards, final String xmlDashboard, final String clientDashboard) { this.name = StringUtils.deleteWhitespace(name); this.singleDashboards = singleDashboards; this.comparisonDashboards = comparisonDashboards; this.xmlDashboard = xmlDashboard; this.clientDashboard = clientDashboard; }