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#removeFirst()
The following examples show how to use
org.apache.commons.lang3.StringUtils#removeFirst() .
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: ShadowSocksCrawlerService.java From ShadowSocks-Share with Apache License 2.0 | 6 votes |
/** * 图片解析 */ protected ShadowSocksDetailsEntity parseImg(String imgURL) throws IOException, NotFoundException { String str = StringUtils.removeFirst(imgURL, "data:image/png;base64,"); Map<DecodeHintType, Object> hints = new LinkedHashMap<>(); // 解码设置编码方式为:utf-8, hints.put(DecodeHintType.CHARACTER_SET, StandardCharsets.UTF_8.name()); //优化精度 hints.put(DecodeHintType.TRY_HARDER, Boolean.TRUE); //复杂模式,开启PURE_BARCODE模式 hints.put(DecodeHintType.PURE_BARCODE, Boolean.TRUE); try (ByteArrayInputStream bis = new ByteArrayInputStream(Base64.decodeBase64(str))) { BufferedImage image = ImageIO.read(bis); Binarizer binarizer = new HybridBinarizer(new BufferedImageLuminanceSource(image)); BinaryBitmap binaryBitmap = new BinaryBitmap(binarizer); Result res = new MultiFormatReader().decode(binaryBitmap, hints); return parseLink(res.toString()); } }
Example 2
Source File: GtpCommand.java From mylizzie with GNU General Public License v3.0 | 5 votes |
static String getLineWithoutResponseHeader(List<String> response, int lineIndex) { if (lineIndex < 0 || lineIndex >= (response == null ? -1 : response.size())) { return ""; } String line = StringUtils.defaultString(response.get(lineIndex)); if (lineIndex == 0) { return StringUtils.removeFirst(line, "^[=?]\\d*\\s*"); } else { return line; } }
Example 3
Source File: GtpCommand.java From mylizzie with GNU General Public License v3.0 | 5 votes |
static List<String> removeResponseHeaderInPlace(List<String> response) { if (CollectionUtils.isNotEmpty(response)) { String beginElement = response.get(0); if (beginElement.startsWith("=") || beginElement.startsWith("?")) { beginElement = StringUtils.removeFirst(beginElement, "^[=?]\\d*\\s*"); response.set(0, beginElement); } } return response; }
Example 4
Source File: WebDavServiceImpl.java From studio with GNU General Public License v3.0 | 5 votes |
protected String getUrl(DavResource resource, String baseUrl, String deliveryUrl, String basePath) { String relativePath = StringUtils.removeFirst(resource.getPath(), basePath); if(resource.isDirectory()) { return baseUrl + relativePath; } else { return (StringUtils.isNotEmpty(deliveryUrl)? deliveryUrl : baseUrl) + relativePath; } }
Example 5
Source File: WebDavServiceImpl.java From studio with GNU General Public License v3.0 | 5 votes |
protected String getUrl(DavResource resource, String profileId, WebDavProfile profile) { String relativePath = StringUtils.removeFirst(resource.getPath(), URI.create(profile.getBaseUrl()).getPath()); if(resource.isDirectory()) { return relativePath; } else { return getRemoteAssetUrl(profileId, relativePath); } }
Example 6
Source File: GeneralUtils.java From smockin with Apache License 2.0 | 4 votes |
public static String sanitizeMultiUserPath(final UserModeEnum usermode, final String pathInfo, final String ctxPath) { return ( UserModeEnum.ACTIVE.equals(usermode) && StringUtils.isNotBlank(ctxPath) ) ? StringUtils.removeFirst(pathInfo, ctxPath) : pathInfo; }
Example 7
Source File: RemoveFirst.java From vscrawler with Apache License 2.0 | 4 votes |
@Override protected String handle(String input, String second) { return StringUtils.removeFirst(input, second); }