> For the complete documentation index, see [llms.txt](https://docs.digia.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digia.tech/logic-and-interaction/adding-logic/string-operations.md).

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digia.tech/logic-and-interaction/adding-logic/string-operations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
