miscHelper.lua utility file - VanaDev/Vana GitHub Wiki

miscHelper.lua

Category: Utility Lua-Based Scripts

getOrdinal

Return(s):

  • ordinal: string
Argument(s):
  • n: number
Notes: Gets the English ordinal for the specified number. For example, passing 4 will cause this function to return "th".

separateDigits

Return(s):

  • delimitedDigitText: string
Argument(s):
  • num: number
Notes: Converts a number to a string equivalent and adds the appropriate English decimal separators. For example, passing 1000000 will cause the function to return "1,000,000".
⚠️ **GitHub.com Fallback** ⚠️