java字符串函数总结大全

static String System.clearProperty(String key)
移除指定键指示的系统属性。
String String.concat(String str)
将指定字符串联到此字符串的结尾。
String EnumConstantNotPresentException.constantName()
返回缺少的枚举常量的名称。
static String String.copyValueOf(char[] data)
返回指定数组中表示该字符序列的字符串。
static String String.copyValueOf(char[] data, int offset, int count)
返回指定数组中表示该字符序列的字符串。
protected String ClassLoader.findLibrary(String libname)
返回本机库的绝对路径名。
static String String.format(Locale l, String format, Object... args)
使用指定的语言环境、格式字符串和参数返回一个格式化字符串。
static String String.format(String format, Object... args)
使用指定的格式字符串和参数返回一个格式化字符串。
String Class.getCanonicalName()
返回《Java Language Specification》中所定义的基础类的规范化名称。
String StackTraceElement.getClassName()
返回类的完全限定名,该类包含由该堆栈跟踪元素所表示的执行点。
static String System.getenv(String name)
获得指定的环境变量值。
String StackTraceElement.getFileName()
返回源文件名,该文件包含由该堆栈跟踪元素所表示的执行点。
String Package.getImplementationTitle()
返回此包的标题。
String Package.getImplementationVendor()
返回提供该实现的组织、供应商或公司的名称。
String Package.getImplementationVersion()
返回该实现的版本。
String Throwable.getLocalizedMessage()
创建此 throwable 的本地化描述。
String Throwable.getMessage()
返回此 throwable 的详细消息字符串。
String StackTraceElement.getMethodName()
返回方法名,此方法包含由该堆栈跟踪元素所表示的执行点。
String Class.getName()
以 String 的形式返回此 Class 对象所表示的实体(类、接口、数组类、基本类型或 void)名称。
String Thread.getName()
返回该线程的名称。
String ThreadGroup.getName()
返回此线程组的名称。
String Package.getName()
返回此包的名称。
static String System.getProperty(String key)
获得指定键指示的系统属性。
static String System.getProperty(String key, String def)
获得用指定键描述的系统属性。
String Class.getSimpleName()
返回源代码中给出的基础类的简称。
String Package.getSpecificationTitle()
返回此包实现的规范标题。
String Package.getSpecificationVendor()
返回拥有并维护实现此包的类规范的组织、供应商或公司的名称。
String Package.getSpecificationVersion()
返回此包实现的规范的版本号。
String String.intern()
返回字符串对象的规范化表示形式。
static String System.mapLibraryName(String libname)
将一个库名称映射到特定于平台的、表示本机库的字符串中。
String Enum.name()
返回此枚举常量的名称,在其枚举声明中对其进行声明。
String String.replace(char oldChar, char newChar)
返回一个新的字符串,它是通过用 newChar 替换此字符串中出现的所有 oldChar 而生成的。
String String.replace(CharSequence target, CharSequence replacement)
使用指定的字面值替换序列替换此字符串匹配字面值目标序列的每个子字符串。
String String.replaceAll(String regex, String replacement)
使用给定的 replacement 字符串替换此字符串匹配给定的正则表达式的每个子字符串。
String String.replaceFirst(String regex, String replacement)
使用给定的 replacement 字符串替换此字符串匹配给定的正则表达式的第一个子字符串。
static String System.setProperty(String key, String value)
设置指定键指示的系统属性。
String[] String.split(String regex)
根据给定的正则表达式的匹配来拆分此字符串。
String[] String.split(String regex, int limit)
根据匹配给定的正则表达式来拆分此字符串。
String String.substring(int beginIndex)
返回一个新的字符串,它是此字符串的一个子字符串。
String StringBuffer.substring(int start)

String String.substring(int beginIndex, int endIndex)
返回一个新字符串,它是此字符串的一个子字符串。
String StringBuffer.substring(int start, int end)

static String Integer.toBinaryString(int i)
以二进制(基数 2)无符号整数形式返回一个整数参数的字符串表示形式。
static String Long.toBinaryString(long i)
以二进制无符号整数形式返回 long 参数的字符串表示形式。
static String Double.toHexString(double d)
返回 double 参数的十六进制字符串表示形式。
static String Float.toHexString(float f)
返回 float 参数的十六进制字符串表示形式。
static String Integer.toHexString(int i)
以十六进制的无符号整数形式返回一个整数参数的字符串表示形式。
static String Long.toHexString(long i)
以十六进制无符号整数形式返回 long 参数的字符串表示形式。
String String.toLowerCase()
使用默认语言环境的规则将此 String 中的所有字符都转换为小写。
String String.toLowerCase(Locale locale)
使用给定 Locale 的规则将此 String 中的所有字符都转换为小写。
static String Integer.toOctalString(int i)
以八进制(基数 8)无符号整数形式返回一个整数参数的字符串表示形式。
static String Long.toOctalString(long i)
以八进制无符号整数形式返回 long 参数的字符串表示形式。
String Object.toString()
返回该对象的字符串表示。
String CharSequence.toString()
返回一个包含此序列中字符的字符串,该字符串与此序列的顺序相同。
String String.toString()
返回此对象本身(它已经是一个字符串!)。
String Class.toString()
将对象转换为字符串。
String Throwable.toString()
返回此 throwable 的简短描述。
String Thread.toString()
返回该线程的字符串表示形式,包括线程名称、优先级和线程组。
String ThreadGroup.toString()
返回此线程组的字符串表示形式。
String StringBuffer.toString()

String StackTraceElement.toString()
返回表示该堆栈跟踪元素的字符串。
String Boolean.toString()
返回表示该布尔值的 String 对象。
String Character.toString()
返回表示此 Character 值的 String 对象。
String Character.Subset.toString()
返回该子集的名称。
String Float.toString()
返回这个 Float 对象的字符串表示形式。
String Double.toString()
返回 Double 对象的字符串表示形式。
String Byte.toString()
返回表示此 Byte 的值的 String 对象。
String Short.toString()
返回表示此 Short 的值的 String 对象。
String Integer.toString()
返回一个表示该 Integer 值的 String 对象。
String Long.toString()
返回表示 Long 值的 String 对象。
String StringBuilder.toString()

String Enum.toString()
返回枚举常量的名称,它包含在声明中。
String Package.toString()
返回此 Package 的字符串表示形式。
static String Boolean.toString(boolean b)
返回一个表示指定布尔值的 String 对象。
static String Byte.toString(byte b)
返回表示指定 byte 的一个新 String 对象。
static String Character.toString(char c)
返回一个表示指定 char 值的 String 对象。
static String Double.toString(double d)
返回 double 参数的字符串表示形式。
static String Float.toString(float f)
返回 float 参数的字符串表示形式。
static String Integer.toString(int i)
返回一个表示指定整数的 String 对象。
static String Integer.toString(int i, int radix)
用第二个参数指定的基数返回第一个参数的字符串表示形式。
static String Long.toString(long i)
返回表示指定 long 的 String 对象。
static String Long.toString(long i, int radix)
返回在使用第二个参数指定的基数时第一个参数的字符串表示形式。
static String Short.toString(short s)
返回表示指定 short 的一个新 String 对象。
String String.toUpperCase()
使用默认语言环境的规则将此 String 中的所有字符都转换为大写。
String String.toUpperCase(Locale locale)
使用给定的 Locale 规则将此 String 中的所有字符都转换为大写。
String String.trim()
返回字符串的副本,忽略前导空白和尾部空白。
String TypeNotPresentException.typeName()
返回不可用类型的完全限定名。
static String String.valueOf(boolean b)
返回 boolean 参数的字符串表示形式。
static String String.valueOf(char c)
返回 char 参数的字符串表示形式。
static String String.valueOf(char[] data)
返回 char 数组参数的字符串表示形式。
static String String.valueOf(char[] data, int offset, int count)
返回 char 数组参数的特定子数组的字符串表示形式。
static String String.valueOf(double d)
返回 double 参数的字符串表示形式。
static String String.valueOf(float f)
返回 float 参数的字符串表示形式。
static String String.valueOf(int i)
返回 int 参数的字符串表示形式。
static String String.valueOf(long l)
返回 long 参数的字符串表示形式。
static String String.valueOf(Object obj)
返回 Object 参数的字符串表示形式。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值