# String Nodes

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-3a291c6fb70966599ecdea2a5ba3c8b42ce1b790%2Fhelper-string.gif?alt=media)

This sub-section consists of all the helper functions related to strings.

### String | Split

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-9fffc057d0bfe4d23b923c50a274ab315f53f86c%2Fstring-split.png?alt=media)

This node splits the string at matches of a pattern and returns a list of substrings. It finds all the matches of the pattern in the string and returns the list of substrings between the matches.

For example If the value in string node is = "Hello world!" and Pattern value = “ ” Then it returns the list consisting of \['Hello', 'world!'];

### String | ToLowerCase

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-319b28af5abf952769cfc67f811594381c7864f3%2Fstring-tolowerxase.png?alt=media)

This node converts all characters in the string to lowercase.

### String | ToUpperCase

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-24f80c7c225b9b4d6daba2905a997d65b561e568%2Fstring-touppercase.png?alt=media)

This node converts all characters in the string to uppercase.

### String | Trim

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-a944a3369741a8e5bee50a9fa78963c3d32d477d%2Fstring-trim.png?alt=media)

This node returns the string without any leading and trailing whitespace. It removes leading and trailing whitespace from the string.

For example, if the string provided is “ Dart is fun ” this node return “Dart is fun”.

### String | Replace All

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-407de89d8c0368433fc142e4efc72b86c0707d59%2Fstring-replaceallstrings.png?alt=media)

This node replaces all substrings that match a specified pattern with a replacement string.

For example, if the string provided is “resume” and the pattern is “e” and replaces it with is “E” then it returns “rEsumE” as result.

### String | SubString

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-f6f95b63109452e6e5a9e70e47a4d27b61a1f63d%2Fstring-substring.png?alt=media)

This node helps you get a portion of the provided string by specifying start and end indices.

Note Indexing in a string starts from 0 instead of 1.

For example, strings “hello World” and you wanted to get only “hello” from the string you can pass start index is 0 and end index is 5 \[instead of 4 because end index is not included].

### String | Replace Range

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-eda5bd6219aedda96ec08d43f8c026d2df0387be%2Fstring-replacerange.png?alt=media)

This node replaces a portion of the string with a new provided string, specified by start and end indices.

{% hint style="info" %} <mark style="color:blue;">Note: Indexing in a string starts from 0 instead of 1.</mark>
{% endhint %}

For example, you have a string Hello World” and you wanted to replace it with “Hey World” so you can pass start index is 0 and end index is 5 \[instead of 4 because end index is not included], and replace String is “Hey”, then this node return “Hey World”.

### String | Concat

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-e9e6d441771836b7a00252459ce3ca865ca77d61%2Fstring-concat.png?alt=media)

This node combines two strings into a single string.

For example, string1 is ”Hello” and String2 is “World”, then it returns “HelloWorld”,

To give space between both of the pass string 2 as ” World” \[with space] in beginning], then it returns “Hello world”.

### String | Contains

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-b3c2e41b23ae61c105a3123f33fa8cf80acac804%2Fstring-contains.png?alt=media)

This node checks whether a given word or substring is present in the string and returns 'true' if it exists, otherwise 'false'.

### String | Equal

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-0fe086a361e76c305827fe555c91fcbdcad58a8d%2Fstring-equals.png?alt=media)

This node checks whether two strings are equal or not and returns 'true' if they are equal, otherwise 'false'.

For example, string1 = "hello" and string2 = "hello" ,it return true.

### String | IsEmpty

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-f423e81f9a64b25fb9e5ee7e5599d66d07f02dae%2Fstring-isempty.png?alt=media)

This node checks whether the provided string is empty (including blank spaces) and returns 'true' if it is empty, otherwise 'false'.

For example, if provided string ="", this node will return true.

{% hint style="info" %} <mark style="color:blue;">Note: This node returns true even if the provided string only contains blank space with out any character.</mark>
{% endhint %}

### String | ToString

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-18ef26fe2d9ea58ec0915501285f37ae055b8669%2Fstring-tostring.png?alt=media)

This node converts other variables and collections like lists or maps into a string.

### String | Length

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-56090df59bb69956e94827907a5024112b9eddf6%2Fstring-length.png?alt=media)

This node returns the length of the provided string, indicating how many characters it contains.

For example, the string is “Hello” – length is 5.

### String | Index Of

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-bc69cef1087ef639e1232f50e1f3f85a7bb8bc61%2Fstring-indexof.png?alt=media)

This node helps you find out the index of a character or substring present in the provided string. It returns the index of the first occurrence of that character or substring.

{% hint style="info" %} <mark style="color:blue;">Note - index starts from 0 in string.</mark>
{% endhint %}

For example, String = “resume” and character = “e”, node will return 1 \[index of first “e” in the string].

### String | Last Index Of

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-e9f53f73921671b384dd897c11d4596efa2b0a96%2Fstring-lastindexof.png?alt=media)

This node helps you find out the index of the last character or substring present in the provided string. If the string consists of multiple occurrences of the same character or substring, it returns the index of the last occurrence.

If no matching character is present in the provided string the node return -1.

If the string consists of only a single character then this node works like the index of node and return the index of the first occurrence of character.

For example, string = “resume” pattern is “e” Result = 5 \[index of last “e” is 5].

### String | Json to String

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-28175e2536c384591634488a73f49a50916749db%2Fstring-jsontostring.png?alt=media)

This node converts the JSON \[Javascript Object Notion] into the string.

This node is mostly used when you are dealing with JSON responses from any web server, in such cases, you need to convert the JSON into a string.

### String | String to JSON

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-12e001d083dbf67cd387b5855077ba3a154c88d0%2Fstring-stringtojson.png?alt=media)

This node helps to convert the string into JSON \[Javascript object notion], similar to the above node, this node is also used when you are dealing with responses from web servers, so in such scenarios, you need to convert the JSON into the string.

### String | Parse String To

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-d7c59e8420b57997c18a9b750a4f63e247abebf4%2Fstring-parsestringto.png?alt=media)

This node converts variables like integers, doubles, or Booleans values back to strings.

For example, integer = 10 is convert into string = “10”, or Boolean = true is converted into “true”.

### String | Compare To

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-6c3b607d8b54012e231e463430b723cf6fd3ebdc%2Fstring-compareto.png?alt=media)

This node returns an integer representing the relationship between two strings:

0 − if the strings are equal.

1 − if the first string is greater than the second

-1 − if the first string is smaller than the second

### String | Ends With

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-1210a914207d89978eb63e42f852236b10e6fd50%2Fstring-endwith.png?alt=media)

This node returns 'true' if the provided string ends with a particular substring, otherwise 'false'.

for example 1. string = “hello” pattern = “llo” , result = true; 2. string “hello” pattern =”e” , result = false.

### String | Starts With

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-e5cc176b89731873f1f20536065c90e78ca4b274%2Fstring-startwith.png?alt=media)

This node returns 'true' if the provided string starts with a particular substring, otherwise 'false'.

for example

string = “hello” pattern = “hel” , result = true.

string “hello” pattern =”yo” , result = false.

### String | Trim Left

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-b380fde835c27be8d51a015af7f6057e86d5ff28%2Fstring-trimleft.png?alt=media)

This node returns the string without any leading whitespace on the left.

For example

1\. Input =” Hello” Output = “Hello”.

2\. Input =” Resume ”, Output = “Resume ”.

### String | Trim Right

![](https://4209426742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me1x4TD1HxodVbK1aDe%2Fuploads%2Fgit-blob-dbc47b388e25035108b4e5dbb6a9d596d4d3e28f%2Fstring-trimright.png?alt=media)

This node returns the string without any trailing whitespace on the right.

For example

1\. Input =”Hello ” Output = “Hello”.

2\. Input =” Resume ”, Output = “ Resume”.

If you have any ideas to make Blup better you can share them through our [Discord community channel](https://discord.com/channels/940632966093234176/965313562425823303)

## Music to go with.

{% embed url="<https://open.spotify.com/playlist/0vvXsWCC9xrXsKd4FyS8kM?si=2c7f55bd3f944878>" %}
Lofi music
{% endembed %}
