---
schema_version: "1"
id: b4983ab2db3a70d34f3c50226fe11613f419c8a480ec4b941d771cfb0f3715c5
title: String Functions
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_saql/guides/reference/bi-saql-functions-string.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-string.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9bd53f77691f457b15dd3a72ac751024f4f46831143702f79c97bd4fb71293c5
products:
  - Analytics SAQL Developer Guide
  - analytics
---

# String Functions

Use SAQL string functions to format your measure and dimension fields.

- **[ascii()](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-string-ascii.md)**


    Returns the UTF-8 code value of a character _n_.

- **[chr()](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-string-chr.md)**


    Returns the UTF-8 character of integer _n_.

- **[ends_with()](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-string-ew.md)**


    Returns `true` if the string ends with the specified characters.

- **[index_of()](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-string-io.md)**


    Returns the location (index) of the specified characters.

- **[len()](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-string-len.md)**


    Returns the number of characters in the string.

- **[lower()](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-string-lower.md)**


    Returns a copy of the string with all characters in lower case.

- **[ltrim()](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-string-ltrim.md)**


    Removes the specified characters from the beginning of a string.

- **[mv_to_string()](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-string-mts.md)**


    Converts multivalue fields to string fields.

- **[number_to_string](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-string-nts.md)**


    Converts a number literal to a string literal.

- **[replace()](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-string-replace.md)**


    Replaces a substring with the specified characters.

- **[rtrim()](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-string-rtrim.md)**


    Removes the specified characters from the end of a string.

- **[starts_with()](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-string-sw.md)**


    Returns `true` if the string starts with the specified characters.

- **[string_to_number](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-string-stn.md)**


    Converts a string literal to a number literal.

- **[substr()](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-string-substr.md)**


    Returns a substring that starts at the specified position. You can also specify the length of the substring to return.

- **[trim()](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-string-trim.md)**


    Removes the specified substring from the beginning and the end of a string.

- **[upper()](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-string-up.md)**


    Returns a copy of the string with all characters in upper case.
