LenB

From Xojo Documentation
Jump to: navigation, search
Method

Returns the number of bytes in the specified string.


Syntax

Introduced 5.0
result=LenB(string)
OR
result=stringVariable.LenB

Part Type Description
result Integer The number of bytes in string.
string String Any valid string expression.
stringVariable String Any variable of type String.

Notes

LenB treats string as a series of bytes, rather than a series of characters. It should be used when string represents binary data. If you need to know the number of characters in string rather than the number of bytes, use the Len function.


Examples

This example uses the LenB function to return the number of bytes in a string.

Dim n As Integer
n=LenB("Hello world") //returns 11

Dim s as String
s="Hello World"
n=s.LenB //returns 11

See Also

AscB, ChrB, InStrB, Len, MidB, RightB functions.

Personal tools
Namespaces

Variants
Actions
Main
Documentation
Community
Toolbox
Help