Skip to main content
Version: v0.20.1

Float

Literal Specific Methods​

plz_f()​

Returns FLOAT

Returns self

123.456.plz_f()
Output
123.456

plz_i()​

Returns INTEGER

Converts the float into an integer.

123.456.plz_i()
Output
123

plz_s()​

Returns STRING

Returns a string representation of the float.

123.456.plz_s()
Output
"123.456"

Generic Literal Methods​

methods()​

Returns ARRAY

Returns an array of all supported methods names.

"test".methods()
Output
["upcase", "find", "format", "reverse", "split", "replace", "strip!", "count", "reverse!", "lines", "downcase!", "upcase!", "size", "plz_i", "strip", "downcase"]

to_json()​

Returns STRING|ERROR

Returns the object as json notation.

a = {"test": 1234}
a.to_json()
Output
{"test": 1234}
"{\"test\":1234}"

type()​

Returns STRING

Returns the type of the object.

"test".type()
Output
"STRING"

wat()​

Returns STRING

Returns the supported methods with usage information.

true.wat()
Output
"BOOLEAN supports the following methods:
plz_s()"