Template:Str number/doc

This is the str number meta-template.

It takes a string as parameter, and returns the number of leading digits. It does not handle negative numbers or decimals, and stops at any minus sign '-' or dot '.' symbols.

Examples
If the parameter is empty or undefined, zero is returned:


 * returns
 * returns
 * returns

The count is interrupted by anything but the ten digits:


 * returns
 * returns
 * returns
 * returns
 * returns
 * returns
 * returns
 * returns
 * returns
 * returns
 * returns