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

# strset(3pub)

set all characters in a string to a given character

## NAME

strset - set all characters in a string to a given character

## SYNOPSIS

```
#include <publib.h>
char *strset(char *str, int c);
```

## DESCRIPTION

*strset* will set all characters (before the terminating '\\0') in the string *str* to *c*.

## RETURN VALUE

*strset* returns its first argument.

## SEE ALSO

publib(3), [memset(3)](/memset/3.md)

## AUTHOR

Lars Wirzenius (lars.wirzenius@helsinki.fi)
