I can declare a range as follows:
range = 1..10
Is there a way to convert the range to a list?
Enum.to_list/1 is what you're looking for:
Enum.to_list/1
iex(3)> Enum.to_list 1..10 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
How do I join two strings in a list with a space, like: ["StringA", "StringB"] becomes "StringA StringB"
In Elixir how do you check for type such as in Python: >>> a = "test" >>> type(a) <type 'str'> >>> b =10 >>> type(b) <type 'int'> I …
I need to convert a string to a floating point value or an integer. There was no method such as, string_to_integer