Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Equivalent of IO.inspect function that just returns string instead of printing given list, map or keyword list?

Tags:

elixir

Elixir newbie here. I've been trying to convert KeywordList into a string. I can do so with

IO.inspect([name: "John Doe"])

but it prints the string to console. Is there a function that just returns the string?

like image 311
Abs Avatar asked Sep 06 '15 09:09

Abs


1 Answers

inspect([name: "John Doe"])

It is defined by the Kernel module and therefore automatically imported.

like image 109
José Valim Avatar answered Nov 09 '22 11:11

José Valim