Std\Types
Types – runtime type conversions.
Provides functions to convert between Yona’s primitive types: Int, Float, Bool, and String.
Functions
Section titled “Functions”toInt : String -> Int
Section titled “toInt : String -> Int”Parse a string as an integer.
import toInt from Std\Types intoInt "42" # => 42toFloat : String -> Float
Section titled “toFloat : String -> Float”Parse a string as a float.
import toFloat from Std\Types intoFloat "3.14" # => 3.14intToString : Int -> String
Section titled “intToString : Int -> String”Convert an integer to its string representation.
import intToString from Std\Types inintToString 42 # => "42"floatToString : Float -> String
Section titled “floatToString : Float -> String”Convert a float to its string representation.
import floatToString from Std\Types infloatToString 3.14 # => "3.14"boolToString : Bool -> String
Section titled “boolToString : Bool -> String”Convert a boolean to "true" or "false".
import boolToString from Std\Types inboolToString true # => "true"