User Manual

GETTING STARTED


MODULES AND PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

ALL USER MANUAL VERSIONS

Ignition 8.1
Ignition 7.9
Ignition 7.8

Deprecated Pages

Employees

Sign In

Skip to end of metadata
Go to start of metadata

This function is used by Ignition's Expression language.

Description

Substring will return the portion of the string from the startIndex to the endIndex, or end of the string if endIndex is not specified. All indexes start at 0, so in the string "Test", "s" is at index 2. Indexes outside of the range of the string throw a StringIndexOutOfBoundsException.

Syntax

substring(string, startIndex[, endIndex])

  • Parameters

string string - The starting string.

string startIndex - The index to start the substring at.

string endIndex - Optional. The end index of the substring.

  • Results

string - The substring from the start to end indexes of the specified string.

Examples
Code Snippet
substring("unhappy", 2) //returns "happy"
Code Snippet
substring("hamburger", 4, 8) //returns "urge"
  • No labels