LenBP function (LotusScript® Language)
Returns the length of a string in bytes, or the number of bytes used to hold a variable, in the platform-native character set.
Syntax
LenBP ( { stringExpr | variantExpr | numericExpr | typeName } )
Elements
stringExpr
Any string expression.
variantExpr
Any Variant expression that includes a variable name.
numericExpr
The name of a variable, an element of an array, an element of a list, or a member variable of a user-defined data type or class. The data type of numericExpr is numeric.
typeName
An instance of a user-defined data type. It can be a simple variable of that data type, or an element of an array variable or a list variable of that data type.
Return value
For stringExpr, LenBP returns the number of bytes in the string expression.
For variantExpr, LenBP returns the number of bytes required to hold the value of variantExpr converted to a String.
For numericExpr, LenBP returns the number of bytes required to hold the contents of numericExpr.
For typeName, LenBP returns the number of bytes required to hold the contents of all the member variables, unless the user-defined data type includes Variant or variable-length String members. In that case, the length of the variable of the user-defined data type may not be the same as the sum of the lengths of its member variables.
Usage
LenBP(NULL) generates an error.
LenBP(v), where v is EMPTY, returns 0.
To determine the length of a string in characters, use the Len function. To determine the length of a string in bytes in the LotusScript® internal character set, use the LenB function. To determine the length of a string in columns (for column-based languages) use the LenC function.