---
id: "string-trim-leftright"
kind: "web-feature"
canonical: "https://timetostable.com/feature/string-trim-leftright"
baseline: "limited"
bcd_version: "8.1.11"
web_features_version: "3.48.0"
---

# String trimLeft() and trimRight() (`string-trim-leftright`)

The trimLeft() and trimRight() methods of strings return a new string with whitespace removed from the beginning or end of the string. They're aliases for trimStart() and trimEnd().

- **Group**: Strings
- **Baseline**: Limited Availability
- **Specification**: https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#String.prototype.trimleft
- **Constituent BCD keys**: 2

## Browser Support Timeline

| Browser | Version | Release Date |
| --- | --- | --- |
| Firefox | 3.5 | 2009-06-30 |
| Chrome | 4 | 2010-01-25 |
| Safari | 5 | 2010-06-07 |
| Safari on iOS | 4.2 | 2010-11-22 |
| Firefox for Android | 4 | 2011-03-29 |
| Chrome Android | 18 | 2012-06-27 |
| Edge | 12 | 2015-07-29 |

