<div class="meta" robots="noindex">

</div>

Method

# LTrim

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `String.TrimLeft<string.trimleft>` as a replacement.

</div>

## Description

Returns the `string</api/data_types/string>` passed with leading (left side) whitespaces removed.

## Usage

*result*=**LTrim**(*SourceString*)

**OR**

Introduced 5.0 *result*=*stringVariable*.**Ltrim**

| Part           | Type                             | Description                                                                   |
|----------------|----------------------------------|-------------------------------------------------------------------------------|
| result         | `String</api/data_types/string>` | *SourceString* with leading whitespaces removed.                              |
| SourceString   | `String</api/data_types/string>` | The source, a copy of which, to be returned with leading whitespaces removed. |
| stringVariable | `String</api/data_types/string>` | Any variable of type `String</api/data_types/string>`.                        |

## Notes

LTrim uses the list of unicode "whitespace" characters at <http://www.unicode.org/Public/UNIDATA/PropList.txt>.

## Sample code

This example removes the whitespaces from the left side of the `string</api/data_types/string>` passed

``` xojo
Var s As String
s = LTrim("  Hello World  ") ' Returns "Hello World  "
s = "  Hello World "
s = s.LTrim ' Returns "Hello World "
```

## Compatibility

All project types on all supported operating systems.

## See also

`Asc</api/math/asc>`, `Chr</api/text/chr>`, `String.IndexOf<string.indexof>`, `String.Left<string.left>`, `String.Length<string.length>`, `String.Middle<string.middle>`, `String.Right<string.right>`, `String.TrimRight<string.trimright>`, `String.Trim<string.trim>` functions.
