LibraryEASYProcess Reference Manual 5ProcessesServicesEvaluatorWorkshopSubstring

Substring Overview

SubString is a service which can be used to get part of the input string as output. This can be useful when a known part of data has to be extracted and saved somewhere else. This Substring will take three inputs. The first being the InputString from which the shorter substring needs to be extracted. The StartIndex denotes the starting position of the substring within the longer InputString. Finally, the Length will denote the number of character to be included starting from the character at StartIndex.

The indexing of the InputString starts at 1. So choosing the StartIndex as 1 and Length as 10, will give you the first ten characters of the InputString. Here, are a few Examples of SubString:





qwerty test




qwerty test



rty te

qwerty test




The length specified should be within the bounds of the available length of the InputString. Otherwise the code will throw an out of bounds error.

Substring Use Examples
InputStringThe InputString is the original longer expression from with the shorter SubString will be extracted. The InputString itself will remain unchanged and the SubString can be saved in a different location.

StartIndexThe StartIndex will denote the index of the character from which the SubString will start. The indexing of characters in the InputString starts from 1.

LengthThis denotes the length of the required output SubString. Which translates to the number of characters included in the SubString starting from the Character at StartIndex.

OutputStringThe output is a smaller string generated from the original expression using the numeric parameters provided in the StartIndex, Length fields.

Substring Use Examples

Basic Use Example

In this example we provide inputs to the SubString service through text boxes. The output is generated in the log and a later service can be used to display this output in the OutputString Textbox field.

We can see in the above example that ‘a’ is the ninth character in the string. So this is the starting point for the Substring. From that point onwards the Substring will consist of the 12 following characters as the specified length is 12. This is how we get the OutputString.

Powered by EASYProcess (© 2019 K-Rise Systems, Inc).