Skip to main content

sscanf

Discworld efun help

sscanf

int sscanf(string str, string fmt, mixed var1, mixed var2 ...)

Parse a string str using the format fmt. fmt can contain strings separated by "%d" and "%s". Every "%d" and "%s" corresponds to one of var1, var2... "%d" will give a number, and "%s" will give a string.

Number of matched "%d" and "%s" is returned.

The Numbver matched being returned is true. However it will only match none or all of the args.

See also

extract, explode.