---
name: "strmtrim"
section: "3pub"
platform: "linux"
package: "publib-dev"
version: "0.40-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/strmtrim"
---

# strmtrim(3pub)

replace multiple white spaces with single blanks within string

## NAME

strmtrim - replace multiple white spaces with single blanks within string

## SYNOPSIS

```
#include <publib.h>
char *strmtrim(char *str);
```

## DESCRIPTION

*strmtrim* will replace every run of whitespace characters (as defined by [*isspace*(3)](/isspace/3.md)) with a single blank.  It will not touch leading and trailing whitespace (use *strltrim*(3) and *strrtrim*(3) for those).

## RETURN VALUE

*strmtrim* will return the value of its argument.

## SEE ALSO

publib(3), strtrim(3), strltrim(3), strrtrim(3)

## AUTHOR

Lars Wirzenius (lars.wirzenius@helsinki.fi)
