ToNumber

From OxeyeWiki

Jump to: navigation, search

WChar:toNumber()

Converts the string object to a number, if possible. Currently this number will have up to 2 decimals. In future implementations, there may be ways of controlling this...

Parameter Expected Type Description
No parameters
Returns

Returns the number value of the text object, or 0 if it's not possible to convert the object to a number.

Daisymoon GUI Lib

Example

   local text = WChar(math.pi)
   local pi = text:toNumber()
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox