String Operations

There are various string operation supported on PIM's dashboard

  1. Concatenation Operator (concat)

  2. Substring Operator(substring)

  3. Length Operator(strLength)

1. Concatenation Operator (concat)

If you want to join couple of string and make a single string than you can use this operator

Arguments

This operator will take upto 255 arguments

Example

concat("I ","Love ","Digia ");
// This will return "I Love Digia" as an output 

2. Substring Operator (substring)

If you want to find out substring from a string than you can use substring operator

Arguments

This operator will take two or three arguments (first 2 arguments are required)

Argument 1 : string from which you want to extract substring

Argument 2: starting index of substring (starting index is inclusive)

Argument 3: ending index of substring (ending index is exclusive)

Example

// Example 1
substring("Digia",1)
// output: igia
// If you only passes the starting index than it will return substring that will start from the starting index uptill the end of the string

//Example 2
substring("Digia",1,3)
// ouput: ig
// Note: start index in inclusive but end index is exclusive

3. Length Operator (strLength)

If you find out the length of the string than you can use length operator

Arguments

It will take one argument which is the string which you want to find out the length and it is the required argument

Example

strLength("Digia")
// Output: 5
// explanation: There are 5 characters in Digia string

Last updated