LEFT Function

The LEFT/LEFTB function is one of the text and data functions. Is used to extract the substring from the specified string starting from the left character. The LEFT function is intended for languages that use the single-byte character set (SBCS), while LEFTB - for languages that use the double-byte character set (DBCS) like Japanese, Chinese, Korean etc.

Syntax

LEFT(text, [num_chars])

The LEFT function has the following arguments:

ArgumentDescription
textA string you need to extract the substring from.
num_charsA number of the substring characters. It must be greater than or equal to 0. It is an optional argument. If it is omitted, the function will assume it to be 1.

LEFTB(text, [num_bytes])

The LEFTB function has the following arguments:

ArgumentDescription
textA string you need to extract the substring from.
num_bytesA number of the substring characters, based on bytes. It is an optional argument.
Notes

How to apply the LEFT/LEFTB function.

Examples

The figure below displays the result returned by the LEFT function.

LEFT Function

Host ONLYOFFICE Docs on your own server or use it in the cloud

Article with the tag:
Browse all tags