首页 > 文档 > char()字符转换
2017
07-20

char()字符转换

Name

char()字符转换

   

Examples

int i = 65;

char c = char(i);

println(i + ” : ” + c); // Prints “65 : A”

 

byte b = 65;

c = char(b);

println(b + ” : ” + c); // Prints “65 : A”

Description

Converts any value of a primitive data type (booleanbytecharcolordoublefloatint, or long) to its numeric character representation.

When an array of values is passed in, then a char array of the same length is returned.

将基元数据类型的任何值 (布尔、字节、char、颜色、双精度、浮点型、int long) 转换为其数字字符表示形式。

 

在传入值数组时, 返回相同长度的 char 数组。



最后编辑:
作者:卡萨布兰卡
这个作者貌似有点懒,什么都没有留下。

留下一个回复

你的email不会被公开。