@@ -3,11 +3,10 @@ module String where
33are enclosed in `"double quotes"`. Strings are *not* lists of characters.
44
55# Basics
6−@docs isEmpty, length, cons, uncons, reverse,
7− map, filter, foldl, foldr, any, all, repeat
6+@docs isEmpty, length, reverse, repeat
87
9−# Split and Join
10−@docs split, join, words, lines
8+# Building and Splitting
9+@docs cons, uncons, append, concat, split, join, words, lines
1110
1211# Get Substrings
1312@docs sub, left, right, dropLeft, dropRight
@@ -24,6 +23,9 @@ Cosmetic operations such as padding with extra characters or trimming whitespace
2423@docs toUpper, toLower,
2524 pad, padLeft, padRight,
2625 trim, trimLeft, trimRight
26+
27+# Higher-Order Functions
28+@docs map, filter, foldl, foldr, any, all
2729-}
2830
2931import Native.String
@@ -46,6 +48,21 @@ pattern match on strings exactly as you would with lists.
4648uncons : String -> Maybe (Char, String)
4749uncons = Native.String.uncons
4850
51+{-| Append two strings. You can also use [the `(++)` operator](/library/List.elm#++)
52+to do this.
53+
54+ append "butter" "fly" == "butterfly"
55+-}
56+append : String -> String -> String
57+append = Native.String.append
58+
59+{-| Concatenate many strings into one.
60+
61+ concat ["never","the","less"] == "nevertheless"
62+-}
63+concat : [String] -> String
64+concat = Native.String.concat
65+
4966{-| Get the length of a string `(length "innumerable" == 11)` -}
5067length : String -> Int
5168length = Native.String.length