---
name: "trim"
section: "3abz"
platform: "linux"
package: "libabz0-dev"
version: "0.5.1"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/trim/3abz"
---

# trim(3abz)

trim whitespace from a string.

## NAME

ltrim, rtrim, trim - trim whitespace from a string.

## LIBRARIES

Abz Library (-labz), Debug Library (-ldebug)

## SYNOPSIS

```
#include <abz/trim.h>

void ltrim(char *str);
void rtrim(char *str);
void trim(char *str);
```

## DESCRIPTION

The **ltrim()** function trim blanks from the left side of the specified string. The **rtrim()** function trim blanks from the right side of the specified string, and the **trim()** function trim blanks from both sides of the specified string.

## NOTES

None of the libabz routines are thread-safe. I'm not planning to change this either! For more information, please see http://threading.2038bug.com/

## AUTHOR

Written by Abraham vd Merwe \<abz@blio.com\>
