Atom

Atom

Convenience functions for working with atoms.

See also Kernel.is_atom/1.

Summary

Functions

to_charlist(atom)

Converts an atom to a charlist

to_string(atom)

Converts an atom to a string

Functions

to_charlist(atom)

to_charlist(atom) :: charlist

Converts an atom to a charlist.

Inlined by the compiler.

Examples

iex> Atom.to_charlist(:"An atom")
'An atom'

to_string(atom)

to_string(atom) :: String.t

Converts an atom to a string.

Inlined by the compiler.

Examples

iex> Atom.to_string(:foo)
"foo"

© 2012–2017 Plataformatec
Licensed under the Apache License, Version 2.0.
https://hexdocs.pm/elixir/1.4.5/Atom.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部