Module:Abilities/utils: Difference between revisionsGive feedback
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
local commonutils = require "Module:Utilities" | |||
local lang = require"Module:Lang" | local lang = require"Module:Lang" | ||
| Line 32: | Line 33: | ||
-- If string ends with 'm', then set the postfix to 'm' and remove it | -- If string ends with 'm', then set the postfix to 'm' and remove it | ||
if | if commonutils.string_endswith(tostring(value), 'm') then | ||
value = tonumber(value:sub(1, -2)) | value = tonumber(value:sub(1, -2)) | ||
postfix = 'm' | postfix = 'm' | ||