@@ -14,8 +14,8 @@ are enclosed in `"double quotes"`. Strings are *not* lists of characters.
1414# Check for Substrings
1515@docs contains, startsWith, endsWith, indexes, indices
1616
17−# Conversion To Numbers
18−@docs toInt, toFloat
17+# Conversions
18+@docs toInt, toFloat, toList, fromList
1919
2020# Formatting
2121Cosmetic operations such as padding with extra characters or trimming whitespace.
@@ -85,12 +85,16 @@ filter = Native.String.filter
8585reverse : String -> String
8686reverse = Native.String.reverse
8787
88−{-|
88+{-| Reduce a string from the left:
89+
90+ foldl cons "" "time" == "emit"
8991-}
9092foldl : (Char -> b -> b) -> b -> String -> b
9193foldl = Native.String.foldl
9294
93−{-|
95+{-| Reduce a string from the right:
96+
97+ foldr cons "" "time" == "time"
9498-}
9599foldr : (Char -> b -> b) -> b -> String -> b
96100foldr = Native.String.foldr
@@ -289,3 +293,19 @@ toInt = Native.String.toInt
289293-}
290294toFloat : String -> Maybe Float
291295toFloat = Native.String.toFloat
296+
297+{-| Convert a string to a list of characters.
298+
299+ toList "abc" == ['a','b','c']
300+-}
301+toList : String -> [Char]
302+toList = Native.String.toList
303+
304+{-| Convert a list of characters into a String. Can be useful if you
305+want to create a string primarly by consing, perhaps for decoding
306+something.
307+
308+ fromList ['a','b','c'] == "abc"
309+-}
310+fromList : String -> [Char]
311+fromList = Native.String.fromList