From Xojo Documentation

Revision as of 14:58, 9 February 2022 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Returns the number of bytes in the specified String.



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


Bytes 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 Length function.


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

Var s As String
s = "Hello World"
n = s.Bytes // returns 11

See Also

String for a complete list of functions.