# String Operations

There are various string operation supported on PIM's dashboard

* <mark style="color:blue;">**Concatenation Operator**</mark> <kbd><mark style="color:blue;">(concat)<mark style="color:blue;"></kbd>
* <mark style="color:blue;">**Substring Operator**</mark><kbd><mark style="color:blue;">(substring)<mark style="color:blue;"></kbd>
* <mark style="color:blue;">**Length Operator**</mark><kbd><mark style="color:blue;">(strLength)<mark style="color:blue;"></kbd>
* <mark style="color:blue;">**Is Empty Operation**</mark><kbd><mark style="color:blue;">( isEmpty )<mark style="color:blue;"></kbd>
* <mark style="color:blue;">**Convert to integer**</mark> <kbd><mark style="color:blue;">( toInt )<mark style="color:blue;"></kbd>

#### 1. Concatenation Operator (concat)

To join multiple strings into a single string we use concatenation operator

#### Arguments

This operator will take upto 255 arguments

#### Example

<pre class="language-javascript"><code class="lang-javascript">concat("I ","Love ","Digia ");
<strong>// This will return "I Love Digia" as an output 
</strong></code></pre>

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

#### <kbd>Example</kbd>

<pre class="language-javascript"><code class="lang-javascript">// 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

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

#### 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

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

#### 4 . isEmpty

Checks if the given value is empty. Supports strings, lists, maps, and numbers

Argument

requires a string page state

```javascript
isEmpty(var)
//var = " "
//it will return true as our page state is empty
```

#### 5 . Toint

Converts a value to an integer. Supports strings and number

Example

```javascript
toInt('10')
//will output 10
```
