Split a string Mar 1, 2016 This example shows how to split a string on whitespace or split on a string. ["1", "2", "3"] = String.split("1,2,3" , ",") # String.split/1 is useful to split on and strip whitespace ["1", "2"] = String.split(" 1 \n \t 2 \n") Documentation: String.split/3 String.split/1