Skip to content

Commit 7aec0e3

Browse files
committed
Merge pull request #38 from hdgarrood/docs-updates
Docs updates
2 parents 65f973a + cc2498f commit 7aec0e3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/Data/String.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ stripPrefix :: String -> String -> Maybe String
8686

8787
If the string starts with the given prefix, return the portion of the
8888
string left after removing it, as a Just value. Otherwise, return Nothing.
89-
* `stripPrefix "http:" "http://purescript.org" == Just "//purescript.org"
90-
* `stripPrefix "http:" "https://purescript.org" == Nothing
89+
* `stripPrefix "http:" "http://purescript.org" == Just "//purescript.org"`
90+
* `stripPrefix "http:" "https://purescript.org" == Nothing`
9191

9292
#### `fromCharArray`
9393

@@ -131,7 +131,7 @@ lastIndexOf :: String -> String -> Maybe Int
131131
```
132132

133133
Returns the index of the last occurrence of the first string in the
134-
second string. Returns `-1` if there is no match.
134+
second string. Returns `Nothing` if there is no match.
135135

136136
#### `lastIndexOf'`
137137

src/Data/String.purs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ dropWhile p s = drop (count p s) s
9797

9898
-- | If the string starts with the given prefix, return the portion of the
9999
-- | string left after removing it, as a Just value. Otherwise, return Nothing.
100-
-- | * `stripPrefix "http:" "http://purescript.org" == Just "//purescript.org"
101-
-- | * `stripPrefix "http:" "https://purescript.org" == Nothing
100+
-- | * `stripPrefix "http:" "http://purescript.org" == Just "//purescript.org"`
101+
-- | * `stripPrefix "http:" "https://purescript.org" == Nothing`
102102
stripPrefix :: String -> String -> Maybe String
103103
stripPrefix prefix str =
104104
case indexOf prefix str of
@@ -137,7 +137,7 @@ foreign import _indexOf' :: (forall a. a -> Maybe a)
137137
-> Maybe Int
138138

139139
-- | Returns the index of the last occurrence of the first string in the
140-
-- | second string. Returns `-1` if there is no match.
140+
-- | second string. Returns `Nothing` if there is no match.
141141
lastIndexOf :: String -> String -> Maybe Int
142142
lastIndexOf = _lastIndexOf Just Nothing
143143

0 commit comments

Comments
 (0)