Available Methods
- isBlank ( )
- isEmpty ( )
- isNotBlank ( )
- isNotEmpty ( )
- equals ( )
- join ( )
- EMPTY
- split ( )
- trimToNull ( )
- equalsIgnoreCase ( )
- contains ( )
- replace ( )
- trimToEmpty ( )
- isNumeric ( )
- capitalize ( )
- defaultString ( )
- startsWith ( )
- substringAfter ( )
- trim ( )
- isNoneBlank ( )
- containsIgnoreCase ( )
- substringBefore ( )
- substringAfterLast ( )
- removeEnd ( )
- repeat ( )
- leftPad ( )
- lowerCase ( )
- countMatches ( )
- substring ( )
- isNoneEmpty ( )
- endsWith ( )
- startsWithIgnoreCase ( )
- stripEnd ( )
- replaceEach ( )
- abbreviate ( )
- defaultIfBlank ( )
- splitByWholeSeparator ( )
- uncapitalize ( )
- strip ( )
- rightPad ( )
- substringBeforeLast ( )
- defaultIfEmpty ( )
- substringBetween ( )
- length ( )
- removeStart ( )
- remove ( )
- isAnyEmpty ( )
- replaceChars ( )
- indexOf ( )
- isAnyBlank ( )
- joinWith ( )
- containsAny ( )
- replaceOnce ( )
- endsWithIgnoreCase ( )
- splitByWholeSeparatorPreserveAllTokens ( )
- splitPreserveAllTokens ( )
- startsWithAny ( )
- deleteWhitespace ( )
- appendIfMissing ( )
- compare ( )
- normalizeSpace ( )
- stripStart ( )
- replaceAll ( )
- lastIndexOf ( )
- equalsAnyIgnoreCase ( )
- stripToNull ( )
- upperCase ( )
- splitByCharacterTypeCamelCase ( )
- left ( )
- reverse ( )
- isAlphanumeric ( )
- center ( )
- isAsciiPrintable ( )
- chomp ( )
- getLevenshteinDistance ( )
- indexOfIgnoreCase ( )
- chop ( )
- equalsAny ( )
- isAllLowerCase ( )
- ordinalIndexOf ( )
- replacePattern ( )
- removeEndIgnoreCase ( )
- containsNone ( )
- isAllBlank ( )
- truncate ( )
- isAllEmpty ( )
- difference ( )
- stripAll ( )
- right ( )
- stripAccents ( )
- containsWhitespace ( )
- endsWithAny ( )
- isWhitespace ( )
- removeStartIgnoreCase ( )
- replaceIgnoreCase ( )
- indexOfAnyBut ( )
- swapCase ( )
- substringsBetween ( )
- wrap ( )
- toCodePoints ( )
- wrapIfMissing ( )
- isAllUpperCase ( )
- isAlpha ( )
- reverseDelimited ( )
- toEncodedString ( )
- compareIgnoreCase ( )
- containsOnly ( )
- removeFirst ( )
Related Classes
- java.util.Arrays
- java.io.File
- java.util.Collections
- java.io.InputStream
- java.util.Date
- java.util.Iterator
- java.util.concurrent.TimeUnit
- java.util.regex.Pattern
- java.net.URL
- java.io.FileInputStream
- java.text.SimpleDateFormat
- java.util.Locale
- java.lang.reflect.Method
- java.util.regex.Matcher
- java.util.Properties
- java.util.UUID
- java.util.stream.Collectors
- java.util.LinkedHashMap
- java.util.Objects
- java.nio.charset.Charset
- java.net.URI
- java.util.Map.Entry
- java.nio.file.Files
- java.util.Optional
- java.nio.charset.StandardCharsets
Java Code Examples for org.apache.commons.lang3.StringUtils#removeStartIgnoreCase()
The following examples show how to use
org.apache.commons.lang3.StringUtils#removeStartIgnoreCase() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RefererCompare.java From bbs with GNU Affero General Public License v3.0 | 5 votes |
/** * 比较referer 和URI是否相同 * @param request * @param uri */ public static boolean compare(HttpServletRequest request,String uri){ String referer = request.getHeader("referer"); //取得URI String newReferer = StringUtils.removeStartIgnoreCase(referer,Configuration.getUrl(request));//移除开始部分的相同的字符,不区分大小写 newReferer = StringUtils.substringBefore(newReferer, ".");//截取到等于第二个参数的字符串为止 newReferer = StringUtils.substringBefore(newReferer, "?");//截取到等于第二个参数的字符串为止 if(uri.equals(newReferer)){//如果是登录页则跳转到首页 return true; } return false; }
Example 2
Source File: QQOauthPlugin.java From java-platform with Apache License 2.0 | 5 votes |
@Override public OauthUser getOauthUser(String accessToken) { Assert.hasText(accessToken); Map<String, Object> parameterMap = new HashMap<>(); parameterMap.put("access_token", accessToken); String responseString = get("https://graph.qq.com/oauth2.0/me", parameterMap); responseString = StringUtils.trim(responseString); responseString = StringUtils.removeStartIgnoreCase(responseString, "callback("); responseString = StringUtils.removeEndIgnoreCase(responseString, ");"); JSONObject jsonObject = JSON.parseObject(responseString); String openid = jsonObject.getString("openid"); OauthUser oauthUser = oauthUserService.findByOauthPluginIdAndUserId(getId(), openid); if (oauthUser == null) { Map<String, Object> apiMap = new HashMap<>(); apiMap.put("access_token", accessToken); apiMap.put("oauth_consumer_key", jsonObject.getString("client_id")); apiMap.put("openid", openid); String apiString = get("https://graph.qq.com/user/get_user_info", apiMap); JSONObject userObject = JSON.parseObject(apiString); oauthUser = oauthUserService.newEntity(); oauthUser.setOauthPluginId(getId()); oauthUser.setUserId(openid); oauthUser.setUsername(openid); oauthUser.setName(userObject.getString("nickname")); oauthUser.setAvatarUrl(userObject.getString("figureurl_qq_2")); } return oauthUser; }
Example 3
Source File: ExprLookup.java From commons-configuration with Apache License 2.0 | 5 votes |
public void setValue(final Object value) throws ConfigurationRuntimeException { try { if (!(value instanceof String)) { this.value = value; return; } final String val = (String) value; final String name = StringUtils.removeStartIgnoreCase(val, CLASS); final Class<?> clazz = ClassUtils.getClass(name); if (name.length() == val.length()) { this.value = clazz.newInstance(); } else { this.value = clazz; } } catch (final Exception e) { throw new ConfigurationRuntimeException("Unable to create " + value, e); } }
Example 4
Source File: RemoveStartIgnoreCase.java From vscrawler with Apache License 2.0 | 4 votes |
@Override protected String handle(String input, String second) { return StringUtils.removeStartIgnoreCase(input, second); }