From Xojo Documentation
|You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!|
Returns the last count bytes from the String.
result = stringVariable.RightBytes(count)
|result||String||The rightmost count bytes of source. The encoding of result is the same as the source.|
|count||Integer||The number of bytes you wish to get from the source.
If count is greater than the length of source, all bytes in source are returned.
|stringVariable||String||Any variable of type String.|
The RightBytes function returns bytes from the source string starting from the right side (as the name implies). The encoding of the result is the same as the encoding of the source string.
RightBytes treats source as a series of bytes rather than a series of characters. It should be used when the string represents binary data. If you need to read characters rather than bytes, use the String.Right function.
This example uses the RightBytes function to return the last 5 bytes from a String.