2023-10-17 23:36:14 +08:00
|
|
|
[discrete]
|
2023-08-29 01:17:16 +08:00
|
|
|
[[esql-left]]
|
|
|
|
=== `LEFT`
|
2024-01-25 23:32:24 +08:00
|
|
|
|
|
|
|
*Syntax*
|
|
|
|
|
2023-09-08 23:27:59 +08:00
|
|
|
[.text-center]
|
|
|
|
image::esql/functions/signature/left.svg[Embedded,opts=inline]
|
2023-08-29 01:17:16 +08:00
|
|
|
|
2024-01-25 23:32:24 +08:00
|
|
|
*Parameters*
|
|
|
|
|
|
|
|
`str`::
|
|
|
|
The string from which to return a substring.
|
|
|
|
|
|
|
|
`length`::
|
|
|
|
The number of characters to return.
|
|
|
|
|
|
|
|
*Description*
|
|
|
|
|
|
|
|
Returns the substring that extracts 'length' chars from 'str' starting
|
|
|
|
from the left.
|
|
|
|
|
|
|
|
*Supported types*
|
|
|
|
|
|
|
|
include::types/left.asciidoc[]
|
|
|
|
|
|
|
|
*Example*
|
2023-08-29 01:17:16 +08:00
|
|
|
|
|
|
|
[source.merge.styled,esql]
|
|
|
|
----
|
|
|
|
include::{esql-specs}/string.csv-spec[tag=left]
|
|
|
|
----
|
|
|
|
[%header.monospaced.styled,format=dsv,separator=|]
|
|
|
|
|===
|
|
|
|
include::{esql-specs}/string.csv-spec[tag=left-result]
|
|
|
|
|===
|