17

问答题 17 /85

编写一个方法,求一个字符串的字节长度。

参考答案

java代码如下:
int strlen(String str){
 byte[] strb=str.getBytes();
 return strb.length;
 }