47LZ2‖

b7UGd‖LEFTB

wevX6‖Returns the first characters of a DBCS text.

tip

2cFVC‖This function is available since LibreOfficeDev 4.2.


GSbiK‖Syntax

dhLwU‖LEFTB("Text" [; Number_bytes])

JF3FC‖Text is the text where the initial partial words are to be determined.

vn58Z‖Number_bytes (optional) specifies the number of characters you want LEFTB to extract, based on bytes. If this parameter is not defined, one character is returned.

MiUAf‖Example

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

QCARB‖=LEFTB("中国";2) returns "中" (2 bytes constitute one complete DBCS character).

CN6Ar‖=LEFTB("中国";3) returns "中 " (3 bytes constitute one DBCS character and a half; the last character returned is therefore a space character).

fzSfg‖=LEFTB("中国";4) returns "中国" (4 bytes constitute two complete DBCS characters).

Yqnmm‖=LEFTB("office";3) returns "off" (3 non-DBCS characters each consisting of 1 byte).