String类

The class String includes methods for examining individual characters of the sequence, for comparing strings, for searching strings, for extracting substrings, and for creating a copy of a string with all characters translated to uppercase or to lowercase. Case mapping is based on the Unicode Standard version specified by the Character class.
类字符串包括用于检查序列的单个字符、比较字符串、搜索字符串、提取子字符串以及创建字符串副本的方法,其中所有字符都转换为大写或小写。大小写映射基于Character指定的Unicode标准。

The Java language provides special support for the string concatenation operator ( + ), and for conversion of other objects to strings. String concatenation is implemented through the StringBuilder(or StringBuffer) class and its append method. For additional information on string concatenation and conversion, see The Java Language Specification.
Java语言提供了对字符串连接运算符(+)以及将其他对象转换为字符串的特殊支持。字符串连接是通过StringBuilder(或StringBuffer)类及其append方法实现的。有关字符串连接和转换的更多信息,请参阅Java语言规范。

A String represents a string in the UTF-16 format in which supplementary characters are represented by surrogate pairs (see the section Unicode Character Representations in the Character class for more information). Index values refer to char code units, so a supplementary character uses two positions in a String.
字符串表示UTF-16格式的字符串,其中补充字符由代理项对表示(有关详细信息,请参阅Character类中的Unicode字符表示部分)。索引值引用字符代码单位,因此补充字符在字符串中使用两个位置。

The String class provides methods for dealing with Unicode code points (i.e., characters), in addition to those for dealing with Unicode code units (i.e., char values).
除了处理Unicode代码单元(即字符值)的方法外,String类还提供了处理Unicode代码点(即字符)的方法。

unless otherwise noted, methods for comparing strings do not take locale into account.The Collator class provides methods for finer-grain,locale-sensitive String comparison.
除非另有说明,否则用于比较字符串的方法不会将区域设置帐户。那个Collator类提供用于更细粒度、区分区域设置的字符串比较的方法。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值