Top
Top
LibraryEASYProcess Reference ManualProcessesServicesEvaluatorWorkshopSubstring

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:

InputString

StartIndex

Length

OutputString

qwerty test

1

5

qwert

qwerty test

4

6

rty te

qwerty test

8

5

<ERROR>

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
Workshop:EvaluatorWorkshop
Service:Substring
Inputs
InputString

StartIndex

Length

Outputs
OutputString

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).