# ltrim()

Removes the specified characters from the beginning of a string.

## Syntax

`ltrim`(*string*,*substr*)

## Usage

Removes every instance of each character in *substr* from the beginning of *string*. This function is case-sensitive. To remove leading spaces, do not specify a value for *substr*.

## Example

This example shows that `ltrim` removes the specified characters from the beginning of a string. This function is case-sensitive.

```nolang
q = load "test";
q = foreach q generate 'Company' as 'Company', ltrim('Company',"abc") as 'ltrim abc',
    ltrim('Company',"cba") as 'ltrim cba', ltrim('Company',"ab") as 'ltrim ab',
    ltrim('Company',"bc") as 'ltrim bc';
```

![Diagram showing number of close opps, grouped by day of the week they were closed.](https://a.sfdcstatic.com/developer-website/sfdocs/analytics/media/bi_dev_guide_saql/ltrim.png)
