@@ -14,8 +14,8 @@ are enclosed in `"double quotes"`. Strings are *not* lists of characters.
14# Check for Substrings
14# Check for Substrings
15@docs contains, startsWith, endsWith, indexes, indices
15@docs contains, startsWith, endsWith, indexes, indices
17−# Conversion To Numbers
17+# Conversions
18−@docs toInt, toFloat
18+@docs toInt, toFloat, toList, fromList
20# Formatting
20# Formatting
21Cosmetic operations such as padding with extra characters or trimming whitespace.
21Cosmetic operations such as padding with extra characters or trimming whitespace.
@@ -85,12 +85,16 @@ filter = Native.String.filter
85reverse : String -> String
85reverse : String -> String
86reverse = Native.String.reverse
86reverse = Native.String.reverse
88−{-|
88+{-| Reduce a string from the left:
90+ foldl cons "" "time" == "emit"
90foldl : (Char -> b -> b) -> b -> String -> b
92foldl : (Char -> b -> b) -> b -> String -> b
91foldl = Native.String.foldl
93foldl = Native.String.foldl
93−{-|
95+{-| Reduce a string from the right:
97+ foldr cons "" "time" == "time"
95foldr : (Char -> b -> b) -> b -> String -> b
99foldr : (Char -> b -> b) -> b -> String -> b
96foldr = Native.String.foldr
100foldr = Native.String.foldr
@@ -289,3 +293,19 @@ toInt = Native.String.toInt
290toFloat : String -> Maybe Float
294toFloat : String -> Maybe Float
291toFloat = Native.String.toFloat
295toFloat = Native.String.toFloat
297+{-| Convert a string to a list of characters.
299+ toList "abc" == ['a','b','c']
301+toList : String -> [Char]
302+toList = Native.String.toList
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
308+ fromList ['a','b','c'] == "abc"
310+fromList : String -> [Char]
311+fromList = Native.String.fromList