---
name: "fmt_str"
section: "3diet"
platform: "linux"
package: "libowfat-dev"
version: "0.28-2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/fmt_str/3diet"
---

# fmt\_str(3diet)

write an ASCII string

## NAME

fmt\_str - write an ASCII string

## SYNTAX

**#include \<fmt.h\>**

size\_t **fmt\_str**(char \**dest*,const char \**source*);

## DESCRIPTION

fmt\_str copies all leading nonzero bytes from *source* to *dest* and returns the number of bytes it copied.

fmt\_str does not append \\0.

If *dest* equals FMT\_LEN (i.e. is zero), fmt\_str returns the number of bytes it would have written, i.e. the number of leading nonzero bytes of *source*.

## SEE ALSO

[strcpy(3)](/strcpy/3.md)
