fluffos/docs/efun/strings/strwidth.md

28 lines
556 B
Markdown
Raw Permalink Normal View History

2020-03-04 23:26:01 -08:00
---
title: efuns / strings / strlen
---
2023-11-25 09:50:24 -08:00
# strwidth
2020-03-04 23:26:01 -08:00
### NAME
strwidth() - returns the display width of a string
### SYNOPSIS
int strwidth( string str );
### DESCRIPTION
strwidth() returns the number of columns to display string 'str'.
The driver uses rules defined in https://www.unicode.org/reports/tr11/tr11-36.html
to calcuate character width.
Control characters have no width. Wide characters, including emojis are two
columns wide. This rule is also used by sprintf() to layout strings.
2020-03-04 23:26:01 -08:00
### SEE ALSO
strlen()