Skip to content
/ any Public

Convert a string or binary representing an integer, float or atom into an integer, float or atom

License

Notifications You must be signed in to change notification settings

shortishly/any

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4f47751 · Jun 1, 2023

History

28 Commits
Jun 1, 2023
Jun 1, 2023
Jan 11, 2019
Feb 8, 2022
May 31, 2023
May 31, 2023
Apr 25, 2016
Jul 6, 2017
Mar 12, 2016
Jun 1, 2023
Feb 8, 2022
May 31, 2023
Nov 24, 2017

Repository files navigation

Any

main

Convert a list or binary representing an integer, float or atom into an integer, float or atom and vise versa.

Examples

1> any:to_integer(<<"123">>).
123
2> any:to_integer("123").
123
3> any:to_integer(123).
123
6> any:to_float(<<"12.34">>).
12.34
7> any:to_float("12.34").
12.34
8> any:to_float(12.34).
12.34
9> any:to_atom(<<"bob">>).
bob
10> any:to_atom("bob").
bob
11> any:to_atom(bob).
bob
12> any:to_boolean(<<"false">>).
false
13> any:to_boolean(<<"true">>).
true
14> any:to_boolean("false").
false
15> any:to_boolean("true").
true
16> any:to_boolean(false).
false
17> any:to_boolean(true).
true

About

Convert a string or binary representing an integer, float or atom into an integer, float or atom

Resources

License

Stars

Watchers

Forks

Packages

No packages published