Going back to our integer example, we saw that there were a few different protocols that integers implement that we can take advantage of, but they may not make immediate sense to us. Let's use String.Chars as an example, where we'll call the h helper on String.Chars to learn more about the module from its documentation:
iex(7)> h String.CharsString.CharsThe String.Chars protocol is responsible for converting a structure to a binary(only if applicable).The only function required to be implemented is to_string/1, which does theconversion.The to_string/1 function automatically imported by Kernel invokes thisprotocol. String interpolation also invokes to_string/1 in its arguments. Forexample, "foo#{bar}" ...