Template:Str number/doc
Lua error: Cannot create process: proc_open(/home4/iltornan/lua/error.log): Failed to open stream: No such file or directory Lua error: Cannot create process: proc_open(/home4/iltornan/lua/error.log): Failed to open stream: No such file or directory
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:
{{str number}}
returns Lua error: Cannot create process: proc_open(/home4/iltornan/lua/error.log): Failed to open stream: No such file or directory{{str number|}}
returns Lua error: Cannot create process: proc_open(/home4/iltornan/lua/error.log): Failed to open stream: No such file or directory{{str number| }}
returns Lua error: Cannot create process: proc_open(/home4/iltornan/lua/error.log): Failed to open stream: No such file or directory
The count is interrupted by anything but the ten digits:
{{str number|abcde}}
returns Lua error: Cannot create process: proc_open(/home4/iltornan/lua/error.log): Failed to open stream: No such file or directory{{str number|123456}}
returns Lua error: Cannot create process: proc_open(/home4/iltornan/lua/error.log): Failed to open stream: No such file or directory{{str number| 123456}}
returns Lua error: Cannot create process: proc_open(/home4/iltornan/lua/error.log): Failed to open stream: No such file or directory{{str number|123 456}}
returns Lua error: Cannot create process: proc_open(/home4/iltornan/lua/error.log): Failed to open stream: No such file or directory{{str number|1234abc}}
returns Lua error: Cannot create process: proc_open(/home4/iltornan/lua/error.log): Failed to open stream: No such file or directory{{str number|1234abc56}}
returns Lua error: Cannot create process: proc_open(/home4/iltornan/lua/error.log): Failed to open stream: No such file or directory{{str number|15<ref>a reference</ref>}}
returns Lua error: Cannot create process: proc_open(/home4/iltornan/lua/error.log): Failed to open stream: No such file or directory{{str number|15(15)}}
returns Lua error: Cannot create process: proc_open(/home4/iltornan/lua/error.log): Failed to open stream: No such file or directory{{str number|-1234xx}}
returns Lua error: Cannot create process: proc_open(/home4/iltornan/lua/error.log): Failed to open stream: No such file or directory{{str number|12.34xx}}
returns Lua error: Cannot create process: proc_open(/home4/iltornan/lua/error.log): Failed to open stream: No such file or directory
See also
Lua error: Cannot create process: proc_open(/home4/iltornan/lua/error.log): Failed to open stream: No such file or directory
References
Lua error: Cannot create process: proc_open(/home4/iltornan/lua/error.log): Failed to open stream: No such file or directory