on master help sign in
Add basics of documentation and start using `pad` as in implementation
commit74a13f59b5db798d95baf3d67933b3deb0eba73f authorEvan Czaplicki <info@elm-lang.org> dateSun 6 Oct 2013, 14:33 (13 years ago) parentcfe1302
1 file changed+29−6
libraries/String.elm+29−6
libraries/String.elm+29−6
@@ -1,5 +1,28 @@
11module String where
22{-| 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+
326-}
427
528import Native.String
@@ -67,18 +90,18 @@ repeat = Native.String.repeat
6790
6891{-|
6992-}
70−center : Int -> Char -> String -> String
71−center = Native.String.center
93+pad : Int -> Char -> String -> String
94+pad = Native.String.pad
7295
7396{-|
7497-}
75−justifyLeft : Int -> Char -> String -> String
76−justifyLeft = Native.String.justifyLeft
98+padLeft : Int -> Char -> String -> String
99+padLeft = Native.String.padLeft
77100
78101{-|
79102-}
80−justifyRight : Int -> Char -> String -> String
81−justifyRight = Native.String.justifyRight
103+padRight : Int -> Char -> String -> String
104+padRight = Native.String.padRight
82105
83106{-|
84107-}