help mata fmtwidth()
-------------------------------------------------------------------------------
Title
[M-5] fmtwidth() -- Width of %fmt
Syntax
real matrix fmtwidth(string matrix f)
Description
fmtwidth(f) returns the width of the %fmt contained in f.
Remarks
fmtwidth("%9.2f") returns 9.
fmtwidth("%20s") returns 20.
fmtwidth("%tc") returns 18.
fmtwidth("%tcDay_Mon_DD_hh:mm:ss_!C!D!T_CCYY") returns 28.
fmtwidth("not a format") returns . (missing).
Conformability
fmtwidth(f):
f: r x c
result: r x c
Diagnostics
fmtwidth(f) returns . (missing) when f does not contain a valid Stata
format.
Source code
Function is built in.
Also see
Manual: [M-5] fmtwidth()
Help: [M-5] strlen(); [M-4] string