From Xojo Documentation
|You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!|
| This item was deprecated in version 2019r2.
Please use String.RightBytes as a replacement.
Returns the last n bytes from the string specified.
|result||String||The rightmost count bytes of source. The encoding of result is the same as the source.|
|source||String||The source string from which to get the bytes.|
|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 RightB 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.
RightB treats source as a series of bytes rather than a series of characters. It should be used when source represents binary data. If you need to read characters rather than bytes, use the Right function.
This example uses the RightB function to return the last 5 bytes from a string.
s = RightB("Hello World", 5) // returns "World"
s = "Hello World"
s = s.RightB(5) // returns "World"