on master help sign in
Add basics of documentation and start using `pad` as in implementation
74a13f5Evan Czaplicki
libraries/String.elm+29−6
@@ -1,5 +1,28 @@
1module String where
1module String where
2{-| A built-in representation of String for effecient string manipulation.
2{-| A built-in representation of String for effecient string manipulation.
3+
4+@docs isEmpty, length, cons, uncons
5+
6+@docs map, filter, reverse, foldl, foldr
7+
8+@docs split, join
9+
10+@docs repeat
11+
12+@docs pad, padLeft, padRight
13+
14+@docs trim, trimLeft, trimRight
15+
16+@docs words, unwords, lines, unlines
17+
18+@docs toUpper, toLower
19+
20+@docs any, all
21+
22+@docs contains, startsWith, endsWith, indices, indexes
23+
24+@docs toInt, toFloat
25+
3-}
26-}
4
27
5import Native.String
28import Native.String
@@ -67,18 +90,18 @@ repeat = Native.String.repeat
67
90
68{-|
91{-|
69-}
92-}
70−center : Int -> Char -> String -> String
93+pad : Int -> Char -> String -> String
71−center = Native.String.center
94+pad = Native.String.pad
72
95
73{-|
96{-|
74-}
97-}
75−justifyLeft : Int -> Char -> String -> String
98+padLeft : Int -> Char -> String -> String
76−justifyLeft = Native.String.justifyLeft
99+padLeft = Native.String.padLeft
77
100
78{-|
101{-|
79-}
102-}
80−justifyRight : Int -> Char -> String -> String
103+padRight : Int -> Char -> String -> String
81−justifyRight = Native.String.justifyRight
104+padRight = Native.String.padRight
82
105
83{-|
106{-|
84-}
107-}