StrToLen
Reduces a string to a specific length.
SYNTAX
|
StrToLen(inString, maxLen, fillChar, doRight)
|
ARGUMENTS
|
inString
|
String or variable.
|
maxLen
|
Result length.
If the value of this parameter is less than the
length of the string, the string is truncated at this position. Otherwise, the
string fills to the required length with the defined filling character.
|
fillChar
|
Filling character.
If no filling character is defined, the default
character is a space.
|
doRight
|
TRUE = Inserts filling
characters at the beginning
FALSE = Insert filling
characters at the end
|
|
RETURN
|
Altered string
|
EXAMPLE
|
Var = "1234"
Var10 = StrToLen(Var, 10, "0", TRUE)
;--> Var10="0000001234"
Var10 = StrToLen(Var, 10, "0", FALSE)
;--> Var10="1234000000"
|