on efb30dd help sign in
elk/libraries/String.elm
131 lines 1.8 kB history raw
1module String where
2{-| A built-in representation of String for effecient string manipulation.
3-}
5import Native.String as Native
6import Maybe (Maybe)
8{-|
9-}
10isEmpty : String
11isEmpty = Native.isEmpty
13{-|
14-}
15cons : Char -> String -> String
16cons = Native.cons
18{-|
19-}
20uncons : String -> Maybe (Char, String)
21uncons = Native.uncons
23{-|
24-}
25map : (Char -> Char) -> String -> String
26map = Native.map
28{-|
29-}
30filter : (Char -> Bool) -> String -> String
31filter = Native.filter
33{-|
34-}
35reverse : String -> String
36reverse = Native.reverse
38{-|
39-}
40foldl : (Char -> b -> b) -> b -> String -> b
41foldl = Native.foldl
43{-|
44-}
45foldr : (Char -> b -> b) -> b -> String -> b
46foldr = Native.foldr
48{-|
49-}
50split : String -> String -> [String]
51split = Native.split
53{-|
54-}
55join : String -> [String] -> String
56join = Native.join
58{-|
59-}
60repeat : Int -> String -> String
61repeat = Native.repeat
63{-|
64-}
65center : Int -> Char -> String -> String
66center = Native.center
68{-|
69-}
70justifyLeft : Int -> Char -> String -> String
71justifyLeft = Native.justifyLeft
73{-|
74-}
75justifyRight : Int -> Char -> String -> String
76justifyRight = Native.justifyRight
78{-|
79-}
80trim : String -> String
81trim = Native.trim
83{-|
84-}
85trimLeft : String -> String
86trimLeft = Native.trimLeft
88{-|
89-}
90trimRight : String -> String
91trimRight = Native.trimRight
93{-|
94-}
95words : String -> [String]
96words = Native.words
98{-|
99-}
100unwords : [String] -> String
101unwords = Native.unwords
103{-|
104-}
105lines : String -> [String]
106lines = Native.lines
108{-|
109-}
110unlines : [String] -> String
111unlines = Native.unlines
113{-|
114-}
115toUpper : String -> String
116toUpper = Native.toUpper
118{-|
119-}
120toLower : String -> String
121toLower = Native.toLower
123{-|
124-}
125any : (Char -> Bool) -> String -> Bool
126any = Native.any
128{-|
129-}
130all : (Char -> Bool) -> String -> Bool
131all = Native.all