Skip to main content
Version: 7.9

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.

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