查看中文原版 English Version

Java API频道主页 > java.lang > String > public String(int[] codePoints, int offset, int count)

搜索标题关键字:


String
public String(int[] codePoints,              int offset,              int count)
分配一个新的 String,它包含 Unicode 代码点数组参数一个子数组的字符。offset 参数是该子数组第一个代码点的索引,count 参数指定子数组的长度。将该子数组的内容转换为 char;后续对 int 数组的修改不会影响新创建的字符串。

参数:
codePoints - 作为 Unicode 代码点的源的数组。
offset - 初始偏移量。
count - 长度。
抛出:
IllegalArgumentException - 如果在 codePoints 中发现任何无效的 Unicode 代码点
IndexOutOfBoundsException - 如果 offsetcount 参数索引字符超出 codePoints 数组的范围。
从以下版本开始:
1.5