VB得到字符串长度的代码?

来源:百度知道 编辑:UC知道 时间:2024/05/16 05:13:08
那个函数名是什么?就是要得到字符串长度的代码名。

len()

长度变量=Len(字符串)

如果是一个变数的话,可以用以下的方法计算
-------------------------------------------

Dim Name As String = "Mary"

MsgBox("The length is " & Name.Length) ' The length is 4

用len()
参数len(string)

。LENTH

Len()