Skip to main content
Version: 8.1

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

    • 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"