String ss="hello"; byte[] buff=ss.getBytes(); int f=buff.length; System.out.println(f);
获取字符串的字节数,而不是字符长度
最新推荐文章于 2025-06-13 17:27:16 发布
String ss="hello"; byte[] buff=ss.getBytes(); int f=buff.length; System.out.println(f);