# String

### Contains

*Returns true if a string contains a given substring.*

#### Expression:

**CONTAINS**(*string*: string, *substring*: string)

#### Return:

boolean

#### Example of usage:

```javascript
CONTAINS("The Lord of the Rings", "Harry Potter")

Return value:
false
```

### Starts With

*Returns true if a string starts with a given substring.*

#### Expression:

**STARTS\_WITH**(*string*: string, *substring*: string)

#### Return:

boolean

#### Example of usage:

```javascript
STARTS_WITH("Some sentence.", "Some")

Return value:
true
```

### Concatenate

*Returns a concatenated string.*

#### Expression:

**CONCAT**(*string1*: string, *string2*: string, *string*?: string)

#### Return:

*concatString*: string

#### Example of usage:

```javascript
CONCAT("Dumb and ","Dumber")

Return value:
"Dumb and Dumber"
```

### Lowercase

*Returns a converted string into lowercase.*

#### Expression:

**LOWERCASE**(*value*: string)

#### Return:

*lowercaseString*: string

#### Example of usage:

```javascript
LOWERCASE("MAKING THIS SENTENCE LOWERCASE")

Return value:
"making this sentence lowercase"
```

### Uppercase

*Returns a converted string into lowercase.*

#### Expression:

**UPPERCASE**(*value*: string)

#### Return:

*uppercaseString*: string

#### Example of usage:

```javascript
UPPERCASE("making this sentence uppercase")

Return value:
"MAKING THIS SENTENCE UPPERCASE"
```

### Is Empty

*Returns true if a value is an empty string.*

#### Expression:

**ISEMPTY**(*value*: string)

#### Return:

boolean

#### Example of usage:

```javascript
ISEMPTY("")

Return value:
true
```

### Empty String to Null

*Returns null if a value is empty. Otherwise returns the value as is.*

#### Expression:

**EMPTYNULL**(*value*: string)

#### Return:

null || string

#### Example of usage:

```javascript
EMPTYNULL("")

Return value:
null
```

### Split

*Returns an exact number of split strings to an array using a separator.*

#### Expression:

**SPLIT**(*value*: string, *delimiter*: string, *maximumElements?*: integer)

#### Return:

*splitString*: array

#### Example of usage:

```javascript
SPLIT("My precious | muppet wife", "|")
SPLIT("My precious | muppet wife", "|", 1)

Return value:
["My precious ", " muppet wife"]
["My precious "]
```

### Substring

*Returns a trimmed string bordered by index numbers.*

#### Expression:

**SUBSTRING**(*inputString*: string, start: integer, end: integer)

#### Return:

*trimmedString*: string

#### Example of usage:

```javascript
SUBSTRING("Birds of Paradise", 0, 3)

Return value:
"Bir"
```

### Replace

*Returns a string; a matched one replaces its pattern.*

#### Expression:

**REPLACE**(*inputString*: string, *searchPattern*: string, *replacedPattern*: string)

#### Return:

*replacedString*: string

#### Example of usage:

```javascript
REPLACE("Birds of Paradise", "Birds", "Lions")

Return value:
"Lions of Paradise"
```

### Join Array to a String

*Returns a string of joined array elements with string separators.*

#### Expression:

**JOIN**(*value*: array, *separator*: string)

#### Return:

*joinedString*: string

#### Example of usage:

```javascript
JOIN(["first", "second", "third"]," -> ")

Return value:
"first -> second -> third"
```

### String Lenght

*Returns a number of characters by a given string.*

#### Expression:

**STRLEN**(*value*: string)

#### Return:

*numberOfCharacters*: integer

#### Example of usage:

```javascript
STRLEN("Count my sentence.")

Return value:
18
```


---

# Agent Instructions: 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:

```
GET https://docs.adapptio.com/reference-guide/functions/string.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
