> For the complete documentation index, see [llms.txt](https://upsolver.gitbook.io/content/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://upsolver.gitbook.io/content/reference-1/functions-and-operators/functions/string.md).

# String

This section describes the following string functions:

<table><thead><tr><th width="256">Function</th><th>Description</th></tr></thead><tbody><tr><td><a href="/pages/wY2Sc9frZxmAmDzeMa9X">BASE64_DECODE</a></td><td>Decode a base 64 string into a string</td></tr><tr><td><a href="/pages/tGZoJV8PtAOclw5zOB2W">BASE64_TO_HEX</a></td><td>Converts a base 64 string into a hex string</td></tr><tr><td><a href="/pages/MhhvNeEvAgIt6E6Nhais">BYTES_SUBSTRING</a></td><td>Returns a substring of the input, using the offsets in bytes of the UTF-8 encoded byte representation. Partial characters and invalid UTF-8 code points are removed from the result</td></tr><tr><td><a href="/pages/n6Ax3cGcrAKNbVFkfyTr">CONCAT</a></td><td>Returns the concatenation of string1, string2, ..., stringN</td></tr><tr><td><a href="/pages/N18oyjooMSCOqpl20IUM">DATE</a></td><td>Casts a string to a date</td></tr><tr><td><a href="/pages/fkCiFidlEPEJzeIm0PzW">JOIN_ARRAYS</a></td><td>Joins any number of arrays by index using a MessageFormat pattern</td></tr><tr><td><a href="/pages/HHOsIDocAGdCqjabh2lc">LENGTH</a></td><td>Returns the length of the string</td></tr><tr><td><a href="/pages/jJTrnyGpiUzfFWMo0es5">LOWER</a></td><td>Converts the string to lowercase letters</td></tr><tr><td><a href="/pages/ifWV1zw4DX87Q8HzSzNs">LPAD</a></td><td>Pad the input string to the left with a given padding string up until size</td></tr><tr><td><a href="/pages/rBlDz7RHge8JM9HVtI58">LTRIM</a></td><td>Returns the given string without leading whitespaces</td></tr><tr><td><a href="/pages/dZ7voQPtW6d1l6uUmVAM">MD5</a></td><td>Hashes the input using MD5</td></tr><tr><td><a href="/pages/e7UCt2GaOqOXrBQBxZ6f">PARSE_DATETIME</a></td><td>Parses a string into a timestamp with time zone using a format</td></tr><tr><td><a href="/pages/y1eacb4hf2k7cIFIEO0Y">REPLACE</a></td><td>Replaces all instances of search with replace in input. If the search is empty, inserts replace in front of every character and at the end of the input</td></tr><tr><td><a href="/pages/XZVYgpzZvaDY0gHBaZ7e">REVERSE</a></td><td>Returns a string with the characters in reverse order</td></tr><tr><td><a href="/pages/RH4ryqPuozmsogTt89oO">RPAD</a></td><td>Pad the input string to the right with a given padding string up until size</td></tr><tr><td><a href="/pages/mH4l7QkRyoMBh5H3RtnP">RTRIM</a></td><td>Returns the given string without trailing whitespaces</td></tr><tr><td><a href="/pages/ltZr8I76eRbWOpjh70g1">SHA1</a></td><td>Hashes the input using SHA-1</td></tr><tr><td><a href="/pages/s5oyz0B2V2N0h4vU6ovb">SHA256</a></td><td>Hashes the input using SHA-256</td></tr><tr><td><a href="/pages/6gSmWcvFzOk1g0U3nDhM">SHA3_512</a></td><td>Hashes the input using SHA3-512</td></tr><tr><td><a href="/pages/jDhmAyT0SJq6poccgALo">SORT_VALUES</a></td><td>Returns the values sorted in dictionary order</td></tr><tr><td><a href="/pages/xfMUqKjKxn1WJCtyPjEu">SPLIT</a></td><td>Returns the given string split by the provided delimiter. Does not remove empty entries</td></tr><tr><td><a href="/pages/s4lSnTuU1qzeGCFyGEGz">SPLIT_TO_RECORD</a></td><td>Returns the given string split by the provided delimiter</td></tr><tr><td><a href="/pages/TEGfh6OEAF2gYalk6Gp4">STRING_FORMAT</a></td><td>Format any number of inputs into a string using the given format</td></tr><tr><td><a href="/pages/gS666uxqRt3WEhCDhbJR">STRIP_MARGIN</a></td><td>For each line remove the prefix of control or whitespace characters followed by the given margin char</td></tr><tr><td><a href="/pages/iBM4Lf7Ce8NPvbvtNBt0">STRIP_PREFIX</a></td><td>Remove the given prefix string from the beginning of the string</td></tr><tr><td><a href="/pages/D87r6gk6Rj4DVvLrlt1I">STRIP_SUFFIX</a></td><td>Remove the given suffix string from the end of the string</td></tr><tr><td><a href="/pages/PQg5Xy6YZi4i5w0Ygai4">STRPOS</a></td><td>Returns the starting position of the first instance of a given substring within a string</td></tr><tr><td><a href="/pages/345Cvx3yApulVq0zdK01">SUBSTR</a></td><td>Extracts a substring of a certain length starting from a specified point within the given string</td></tr><tr><td><a href="/pages/XxiRJKmA8cG36Cdy15lc">SUBSTRING</a></td><td>Extracts a substring of a certain length starting from a specified point within the given string</td></tr><tr><td><a href="/pages/z9TtwBNpz67YFaqxigDh">TRANSLATE</a></td><td>Translates the given value using a given dictionary</td></tr><tr><td><a href="/pages/ED66Pn9H4da37iznIPwK">TRIM</a></td><td>Returns the given string without leading or trailing whitespaces</td></tr><tr><td><a href="/pages/mmpiZb4FYVchNRTsOzhv">TRIM_CHARS</a></td><td>Returns the given string without leading or trailing characters</td></tr><tr><td><a href="/pages/qdrT2637blR0feMjNkhj">UPPER</a></td><td>Converts the string to uppercase letters</td></tr><tr><td><a href="/pages/KuMVmCQn24q8C6nFmJuC">UUID_GENERATOR</a></td><td>Returns UUID</td></tr><tr><td><a href="/pages/81t1MQjKZMVXkieZkLLR">XX_HASH</a></td><td>Hashes the input using xxHash</td></tr></tbody></table>


---

# 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://upsolver.gitbook.io/content/reference-1/functions-and-operators/functions/string.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.
