Commits

Bryan O'Sullivan committed d174590

Rename stripLeft to stripStart, and stripRight to stripEnd.

Comments (0)

Files changed (2)

     , dropWhileEnd
     , dropAround
     , strip
-    , stripLeft
-    , stripRight
+    , stripStart
+    , stripEnd
     , splitAt
     , span
     , break
 -- | /O(n)/ Remove leading white space from a string.  Equivalent to:
 --
 -- > dropWhile isSpace
-stripLeft :: Text -> Text
-stripLeft = dropWhile isSpace
-{-# INLINE [1] stripLeft #-}
+stripStart :: Text -> Text
+stripStart = dropWhile isSpace
+{-# INLINE [1] stripStart #-}
 
 -- | /O(n)/ Remove trailing white space from a string.  Equivalent to:
 --
 -- > dropWhileEnd isSpace
-stripRight :: Text -> Text
-stripRight = dropWhileEnd isSpace
-{-# INLINE [1] stripRight #-}
+stripEnd :: Text -> Text
+stripEnd = dropWhileEnd isSpace
+{-# INLINE [1] stripEnd #-}
 
 -- | /O(n)/ Remove leading and trailing white space from a string.
 -- Equivalent to:

tests/Properties.hs

 prop_S_dropWhileEnd p  = T.dropWhileEnd p `eq` (S.reverse . S.dropWhile p . S.reverseStream)
 prop_T_dropWhileEnd p  = (T.reverse . T.dropWhile p . T.reverse) `eq` T.dropWhileEnd p
 prop_T_dropAround p    = (T.dropWhile p . T.dropWhileEnd p) `eq` T.dropAround p
-prop_T_stripLeft       = T.dropWhile isSpace `eq` T.stripLeft
-prop_T_stripRight      = T.dropWhileEnd isSpace `eq` T.stripRight
+prop_T_stripStart       = T.dropWhile isSpace `eq` T.stripStart
+prop_T_stripEnd      = T.dropWhileEnd isSpace `eq` T.stripEnd
 prop_T_strip           = T.dropAround isSpace `eq` T.strip
 prop_T_splitAt n       = L.splitAt n   `eqP` (unpack2 . T.splitAt n)
 prop_TL_splitAt n      = L.splitAt n   `eqP` (unpack2 . TL.splitAt (fromIntegral n))
   ("prop_S_dropWhileEnd", mytest prop_S_dropWhileEnd),
   ("prop_T_dropWhileEnd", mytest prop_T_dropWhileEnd),
   ("prop_T_dropAround", mytest prop_T_dropAround),
-  ("prop_T_stripLeft", mytest prop_T_stripLeft),
-  ("prop_T_stripRight", mytest prop_T_stripRight),
+  ("prop_T_stripStart", mytest prop_T_stripStart),
+  ("prop_T_stripEnd", mytest prop_T_stripEnd),
   ("prop_T_strip", mytest prop_T_strip),
   ("prop_T_splitAt", mytest prop_T_splitAt),
   ("prop_T_span", mytest prop_T_span),
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.