java开发_org.apache.commons.lang.StringUtils工具类源码

package org.apache.commons.lang; 18 19 import java.util.ArrayList; 20 import java.util.Collection; 21 import java.util.Iterator; 22 import java.util.List; 23 import java.util.Locale; 24 25 import org.apache.commons.lang.text.StrBuilder; 26 27 /** 28 *

Operations on {@link java.lang.String} that are 29 * null safe.

30 * 31 *
    32 *
  • IsEmpty/IsBlank 33 * - checks if a String contains text 34 *
  • Trim/Strip 35 * - removes leading and trailing whitespace 36 *
  • Equals 37 * - compares two strings null-safe 38 *
  • startsWith 39 * - check if a String starts with a prefix null-safe 40 *
  • endsWith 41 * - check if a String ends with a suffix null-safe 42 *
  • IndexOf/LastIndexOf/Contains 43 * - null-safe index-of checks 44 *
  • IndexOfAny/LastIndexOfAny/IndexOfAnyBut/LastIndexOfAnyBut 45 * - index-of any of a set of Strings 46 *
  • ContainsOnly/ContainsNone/ContainsAny 47 * - does String contains only/none/any of these characters 48 *
  • Substring/Left/Right/Mid 49 * - null-safe substring extractions 50 *
  • SubstringBefore/SubstringAfter/SubstringBetween 51 * - substring extraction relative to other strings 52 *
  • Split/Join 53 * - splits a String into an array of substrings and vice versa 54 *
  • Remove/Delete 55 * - removes part of a String 56 *
  • Replace/Overlay 57 * - Searches a String and replaces one String with another 58 *
  • Chomp/Chop 59 * - removes the last part of a String 60 *
  • LeftPad/RightPad/Center/Repeat 61 * - pads a String

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。