StrByteCount

Returns the length of a string, in bytes.

Syntax:

StrByteCount (string, request)

Parameters:

(s) string specifies an ANSI or Unicode string.

(i) request specifies how "string" should be treated in order to calculate its length:

Returns:

(i) length Returns the length of a string, in bytes.

 

Request

Meaning

-1

current format (ANSI or Unicode)

0

ANSI string (including double-byte ANSI character sets)

1

Unicode string

Example:


myname = AskLine("Firstname", "Enter your first name:", "", 0)
numbytes = StrByteCount(myname, -1)
Message("Number of bytes in first name", numbytes)
See Also:

StrLen