Documentation/Calc Functions/RIGHTB

From The Document Foundation Wiki
Jump to: navigation, search


Im-jabber.svg

Under construction.
For now, see the system Help files.


Function name:

RIGHTB

Category:

Text

Summary:

Returns the last character or characters of a text with double bytes characters sets (DBCS).

Syntax:

RIGHTB("Text"; Number_bytes)

Returns:

Arguments:

Text is the text of which the right part is to be determined.

Number_bytes (optional) specifies the number of characters you want RIGHTB to extract, based on bytes.

Additional details:

Examples:

RIGHTB("中国";1) returns " " (1 byte is only half a DBCS character and a space character is returned instead).

RIGHTB("中国";2) returns "国" (2 bytes constitute one complete DBCS character).

RIGHTB("中国";3) returns " 国" (3 bytes constitute one half DBCS character and one whole DBCS character; a space is returned for the first half).

RIGHTB("中国";4) returns "中国" (4 bytes constitute two complete DBCS characters).

RIGHTB("office";3) returns "ice" (3 non-DBCS characters each consisting of 1 byte).

Related LibreOffice functions:

ODF standard:

Equivalent Excel functions: