Module:utilities/scribunto parameter key/documentation

Wiktionary වෙතින්

Takes a parameter name as an input, and returns the Scribunto-normalized form (i.e. the key that that parameter would have in a frame.args table). For example, "1" is normalized to 1 (a number), and " foo " is normalized to "foo". If the input is not a string, it is returned unchanged.

Strings are trimmed with Module:string/php trim, and then converted to numbers if:

  1. They are integers, with no decimals (2.0) or leading zeroes (02).
  2. They are ≤ 253 and ≥ -253.
  3. For positive values, they do not have a leading + sign.

Note: Lua integers are only accurate to 253 - 1, so 253 and -253 have to be specifically checked for, since 2^53 == 2^53 + 1 evaluates to true.


"https://si.wiktionary.org/w/index.php?title=Module:utilities/scribunto_parameter_key/documentation&oldid=164357" වෙතින් සම්ප්‍රවේශනය කෙරිණි