WoW:API tonumber: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 18: Line 18:
  tonumber("argqerg")   
  tonumber("argqerg")   
  --Returns nil
  --Returns nil
----
----
{{Template:WoW API}}
{{WoW API}}
[[Category:API Functions|tonumber]]
[[Category:API String Functions|tonumber]]

Revision as of 05:57, 4 January 2006

tonumber() -Documentation by Two-

Arguments
tonumber(text)
text (string) - this value will be converted to a numeric value.

Returns
The argument as a numeric value or nil if the value cannot be converted.

Examples
tonumber("123")  
--Returns 123
tonumber("argqerg")  
--Returns nil

Template:WoW API