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