وظيفة VBScript Len

التعريف والاستخدام

يمكن للوظيفة Len إرجاع عدد الأحرف في النص.

النحو

Len(string|varname)
المتغير الوصف
string عبارات النص.
varname اسم المتغير.

مثال

مثال 1

dim txt
txt="This is a beautiful day!"
document.write(Len(txt))

الناتج:

24

مثال 2

document.write(Len("This is a beautiful day!"))

الناتج:

24