zoukankan      html  css  js  c++  java
  • Commons Lang

    Operations on String that are null safe.

    IsEmpty/IsBlank - checks if a String is empty (判断字符串是否为空)

    Trim/Strip - removes leading and trailing whitespace (删除前后的控制字符、空白字符) 

    Equals - compares two strings null-safe (判断字符串是否相等)

    startsWith - check if a String starts with a prefix null-safe 

    endsWith - check if a String ends with a suffix null-safe

    IndexOf/LastIndexOf/Contains - null-safe index-of checks

    IndexOfAny/LastIndexOfAny/IndexOfAnyBut/LastIndexOfAnyBut - index-of any of a set of Strings

    ContainsOnly/ContainsNone/ContainsAny - does String contains only/none/any of these characters

    Substring/Left/Right/Mid - null-safe substring extractions

    SubstringBefore/SubstringAfter/SubstringBetween - substring extraction relative to other strings (获得相对于分隔符位置的子串)

    Split/Join - splits a String into an array of substrings and vice versa (拆分、拼接字符串)

    Remove/Delete - removes part of a String

    Replace/Overlay - Searches a String and replaces one String with another 

    Chomp/Chop - removes the last part of a String

    AppendIfMissing - appends a suffix to the end of the String if not present (如果字符不以指定的后缀结尾,则在字符串后补充该后缀返回)

    PrependIfMissing - prepends a prefix to the start of the String if not present (如果字符不以指定的前缀开头,则在字符串前补充该前缀返回)

    LeftPad/RightPad/Center/Repeat - pads a String

    UpperCase/LowerCase/SwapCase/Capitalize/Uncapitalize - changes the case of a String (改变字符的大小写)

    CountMatches - counts the number of occurrences of one String in another

    IsAlpha/IsNumeric/IsWhitespace/IsAsciiPrintable - checks the characters in a String

    DefaultString - protects against a null input String (预防 null)

    Reverse/ReverseDelimited - reverses a String (反转字符串)

    Abbreviate - abbreviates a string using ellipsis

    Difference - compares Strings and reports on their differences

    LevenshteinDistance - the number of changes needed to change one String into another

    More: JavaDoc

  • 相关阅读:
    25-网易新闻iOS版使用的开源组件
    03-Xcode 6 插件失效的临时解决方案
    01-CEO才是天花板
    01-微信6.2
    01-创业视频
    03-http2翻译在线文档
    02-iOS核心动画-第一课——ViewAnimations
    24-Xcode快捷键
    02-IOS项目开发代码规范标准
    03-iOS Socket用法
  • 原文地址:https://www.cnblogs.com/huey/p/5630227.html
Copyright © 2011-2022 走看看