string_size()string_size()

返回输入字符串的大小(以字节为单位)。Returns the size, in bytes, of the input string.

语法Syntax

string_size(source)string_size(source)

参数Arguments

  • source:将测量字符串大小的源字符串。source: The source string that will be measured for string size.

返回Returns

返回输入字符串的长度(以字节为单位)。Returns the length, in bytes, of the input string.

示例Examples

print size = string_size("hello")
大小size
55
print size = string_size("⒦⒰⒮⒯⒪")
大小size
1515