| Name | textWidth() | ||
|---|---|---|---|
| Examples |   textSize(28) c = 'T' cw = textWidth(c) text(c, 0, 40) line(cw, 0, cw, 50) s = "Tokyo" sw = textWidth(s) text(s, 0, 85) line(sw, 50, sw, 100) | ||
| Description | Calculates and returns the width of any character or text string. | ||
| Syntax | textWidth(str) | ||
| Parameters | 
 | ||
| Related | loadFont() text() textFont() | 
Updated on Tue Feb 27 14:07:12 2024.
If you see any errors or have comments, please let us know.
 
                    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License