Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more bytestring like functions #202

Closed
wants to merge 5 commits into from
Closed

Conversation

hasufell
Copy link
Member

@hasufell hasufell commented Oct 14, 2023

This introduce bytestring-like functions (substrings, predicates, searching, etc.) to System.OsString, System.OsString.Windows and System.OsString.Posix.

Relevant for pcapriotti/optparse-applicative#65


Functions added:

  • snoc
  • cons
  • last
  • tail
  • uncons
  • head
  • init
  • unsnoc
  • null
  • length
  • map
  • reverse
  • intercalate
  • foldl
  • foldl'
  • foldl1
  • foldl1'
  • foldr
  • foldr'
  • foldr1
  • foldr1'
  • all
  • any
  • concat
  • replicate
  • unfoldr
  • unfoldrN
  • take
  • takeEnd
  • takeWhileEnd
  • takeWhile
  • drop
  • dropEnd
  • dropWhileEnd
  • dropWhile
  • break
  • breakEnd
  • span
  • spanEnd
  • splitAt
  • split
  • splitWith
  • stripSuffix
  • stripPrefix
  • isInfixOf
  • isPrefixOf
  • isSuffixOf
  • breakSubstring
  • elem
  • find
  • filter
  • partition
  • index
  • indexMaybe
  • (!?)
  • elemIndex
  • elemIndices
  • count
  • findIndex
  • findIndices

System/OsString/Common.hs Outdated Show resolved Hide resolved
@hasufell hasufell force-pushed the bytestring-functions branch 2 times, most recently from b0e7018 to 0b6d702 Compare October 16, 2023 10:27
System/OsString.hs Outdated Show resolved Hide resolved
System/OsString/Common.hs Outdated Show resolved Hide resolved
System/OsString/Common.hs Outdated Show resolved Hide resolved
System/OsString/Common.hs Outdated Show resolved Hide resolved
@hasufell hasufell requested a review from clyring October 16, 2023 16:40
System/OsString/Internal.hs Outdated Show resolved Hide resolved
System/OsString/Common.hs Outdated Show resolved Hide resolved
System/OsString/Common.hs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants