left
This function is used by Ignition's Expression language.
Descriptionβ
Returns count characters from the left side of string, where count and string are the arguments to the function.
Syntaxβ
left(string, charCount)
Parametersβ
| Type | Parameter | Description |
|---|---|---|
| String | string | The starting string. |
| Integer | charCount | The number of characters to return. |
Resultsβ
String - A string that is the first charCount number of characters of the specified string.
Examplesβ
Code Snippet
left("hello", 2) //returns "he"
Code Snippet
left("hello", 0) //returns ""
Code Snippet
left("hello", 5) //returns "hello"