RIGHTB function

In languages that use the double-byte character set, RIGHTB returns the specified number of bytes at the end of a text string.


RIGHTB (text, number)

  • text is the text from which a portion at the end, specified by number, is returned.
  • number (optional) is the number of characters (bytes) to return from the last part of the text.

RIGHTB counts punctuation and spaces as characters. If the first byte of the returned text is the last half of a double-byte character, RIGHTB replaces the incomplete character with a space.


RIGHTB("Single byte",4) returns byte.