當前位置: 首頁>>代碼示例>>Java>>正文


Java StringUtils.endsWithIgnoreCase方法代碼示例

本文整理匯總了Java中org.apache.commons.lang3.StringUtils.endsWithIgnoreCase方法的典型用法代碼示例。如果您正苦於以下問題:Java StringUtils.endsWithIgnoreCase方法的具體用法?Java StringUtils.endsWithIgnoreCase怎麽用?Java StringUtils.endsWithIgnoreCase使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.commons.lang3.StringUtils的用法示例。


在下文中一共展示了StringUtils.endsWithIgnoreCase方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getRelationTableNames

import org.apache.commons.lang3.StringUtils; //導入方法依賴的package包/類
public List<String> getRelationTableNames(String table) {
	List<String> result = new ArrayList<String>();
	String sql = "SELECT name FROM sqlite_master WHERE type='table' AND (name LIKE '" + table + "#_%' OR name LIKE '%#_" + table +"' ESCAPE '#')";
	
	Cursor c = getCursor(sql);
	
	while(c.moveToNext()) {
		String name = c.getString(c.getColumnIndexOrThrow("name"));
	
		if(!name.equalsIgnoreCase(table) && (
				StringUtils.startsWithIgnoreCase(name, table) || 
				StringUtils.endsWithIgnoreCase(name, table)
			)) {
			
			result.add(name);
		}
	}
	
	close(c);
	return result;
}
 
開發者ID:Linguaculturalists,項目名稱:Phoenicia,代碼行數:22,代碼來源:MigrationHelper.java

示例2: getNumberOfDays

import org.apache.commons.lang3.StringUtils; //導入方法依賴的package包/類
private static BigDecimal getNumberOfDays(String expiry) {
  if (StringUtils.endsWithIgnoreCase(expiry, TENOR_SUFFIX_YEARS)) {
    return DAYS_IN_YEAR.multiply(new BigDecimal(StringUtils.replaceIgnoreCase(expiry, TENOR_SUFFIX_YEARS, StringUtils.EMPTY)));
  } else if (StringUtils.endsWithIgnoreCase(expiry, TENOR_SUFFIX_MONTHS)) {
    return DAYS_PER_MONTH.multiply(new BigDecimal(StringUtils.replaceIgnoreCase(expiry, TENOR_SUFFIX_MONTHS, StringUtils.EMPTY)));
  } else {
    return DAYS_IN_WEEK.multiply(new BigDecimal(StringUtils.replaceIgnoreCase(expiry, TENOR_SUFFIX_WEEKS, StringUtils.EMPTY)));
  }
}
 
開發者ID:AcadiaSoft,項目名稱:simm-lib,代碼行數:10,代碼來源:CurvatureMarginWeightUtils.java

示例3: rmXSS

import org.apache.commons.lang3.StringUtils; //導入方法依賴的package包/類
private String rmXSS(String script) {// 移除存在XSS攻擊威脅的字符串

			if (StringUtils.isBlank(script)) {
				return script;
			}

			Pattern p = Pattern.compile("<root>.+</root>");// 例外處理
			Matcher m = p.matcher(script);

			if (m.find()) {
				return script;
			}

			if (StringUtils.endsWithIgnoreCase(script, "\56jsp")) {// 例外處理
				return script;
			}

			if (StringUtils.isNotEmpty(StringUtils.substringBetween(script, "【", "】"))) {// 例外處理
				return script;
			}

			script = rmXSSBetween(script, "<", ">");
			script = rmXSSBetween(script, "\"", "\"");
			script = rmXSSBetween(script, "'", "'");
			script = rmXSSBetween(script, "&lt;", ">");
			script = rmXSSBetween(script, "<", "&gt;");
			script = rmXSSBetween(script, "&lt;", "&gt;");
			script = rmXSSBetween(script, "(", ")");
			script = rmXSSDangerousCharacters(script, DANGEROUS_CHARACTERS);
			script = rmXSSDangerousCharacters(CHARACTERS_DANGEROUS, script);

			String[] temp = StringUtils.split(script);
			if (null != temp && temp.length > 0) {
				return temp[0];
			}

			return script;
		}
 
開發者ID:Fetax,項目名稱:Fetax-AI,代碼行數:39,代碼來源:XSSFilter.java

示例4: isUrlMatchingEntity

import org.apache.commons.lang3.StringUtils; //導入方法依賴的package包/類
public boolean isUrlMatchingEntity(String entity) {
    boolean isLast = StringUtils.endsWithIgnoreCase(url, RedirectorConstants.DELIMETER + entity);
    boolean isInTheMiddle = StringUtils.containsIgnoreCase(url, RedirectorConstants.DELIMETER + entity + RedirectorConstants.DELIMETER);
    boolean isLastBeforeQueryParam = StringUtils.containsIgnoreCase(url, RedirectorConstants.DELIMETER + entity + QUERY_PARAM_START);

    return  isLast || isInTheMiddle || isLastBeforeQueryParam;
}
 
開發者ID:Comcast,項目名稱:redirector,代碼行數:8,代碼來源:Request.java

示例5: handle

import org.apache.commons.lang3.StringUtils; //導入方法依賴的package包/類
@Override
protected boolean handle(String input, String searchString, boolean ignoreCase) {
    if (ignoreCase) {
        return StringUtils.endsWithIgnoreCase(input, searchString);
    } else {
        return StringUtils.endsWith(input, searchString);
    }
}
 
開發者ID:virjar,項目名稱:vscrawler,代碼行數:9,代碼來源:EndsWith.java

示例6: filterSensitiveConfiguration

import org.apache.commons.lang3.StringUtils; //導入方法依賴的package包/類
public static Configuration filterSensitiveConfiguration(Configuration configuration){
    Set<String> keys = configuration.getKeys();
    for (final String key : keys) {
        boolean isSensitive = StringUtils.endsWithIgnoreCase(key, "password")
                || StringUtils.endsWithIgnoreCase(key, "accessKey");
        if (isSensitive && configuration.get(key) instanceof String) {
            configuration.set(key, configuration.getString(key).replaceAll(".", "*"));
        }
    }
    return configuration;
}
 
開發者ID:yaogdu,項目名稱:datax,代碼行數:12,代碼來源:Engine.java

示例7: getHttpRequest

import org.apache.commons.lang3.StringUtils; //導入方法依賴的package包/類
private static HttpRequest getHttpRequest(String url, Object data, String method) throws IOException {
    if (StringUtils.endsWithIgnoreCase(method, HttpMethods.GET)) {
        return requestFactory.buildGetRequest(new GenericUrl(url + genParamGet(data)));
    } else {
        Map<String, Object> paramMap = genParamMap(data);
        UrlEncodedContent urlEncodedContent = new UrlEncodedContent(paramMap);
        return requestFactory.buildRequest(method, new GenericUrl(url), urlEncodedContent);
    }
}
 
開發者ID:slking1987,項目名稱:mafia,代碼行數:10,代碼來源:HttpUtil.java


注:本文中的org.apache.commons.lang3.StringUtils.endsWithIgnoreCase方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。