words -package:relude -package:streaming-bytestring

words breaks a string up into a list of words, which were delimited by white space (as defined by isSpace). This function trims any white spaces at the beginning and at the end.
>>> words "Lorem ipsum\ndolor"
["Lorem","ipsum","dolor"]

>>> words " foo bar "
["foo","bar"]
words breaks a ByteString up into a list of words, which were delimited by Chars representing white space.
words breaks a ByteString up into a list of words, which were delimited by Chars representing white space. And
tokens isSpace = words
O(n) Breaks a Text up into a list of words, delimited by Chars representing white space.
words breaks a string up into a list of words, which were delimited by white space.
>>> words "Lorem ipsum\ndolor"
["Lorem","ipsum","dolor"]
Split an input into word-sized Docs.
>>> putDoc (tupled (words "Lorem ipsum dolor"))
(Lorem, ipsum, dolor)
Splits a bytestring InputStream into words. See splitOn and words. Example:
ghci> is <- Streams.fromList ["Hello, world!"] >>= Streams.words
ghci> replicateM 3 (Streams.read is)
[Just "Hello,", Just "world!", Nothing]
Note that this may increase the chunk size if the input contains extremely long words.
Break up a textual sequence into a list of words, which were delimited by white space.
> words "abc  def ghi"
["abc","def","ghi"]
Convert a bytestream to delimited words Note: This function is purely for demonstration purposes since it assumes a particular encoding. You should prefer the Text equivalent of this function from the pipes-text library.
Breaks a string into a list of words
Splits the given YiString into a list of words, where spaces are determined by isSpace. No empty strings are in the result list.
Split a text stream into FreeT-delimited words. Note that roundtripping with e.g. over words id eliminates extra space characters as with Prelude.unwords . Prelude.words
The words function breaks a stream of characters into a stream of words, which were delimited by white space. Beware: if the stream of characters xs does not contain white space, accessing the tail of words xs will loop.
Split words in a string using spaces as separation
words "Hello Foundation"
Break a string up into a stream of strings, which were delimited by characters representing white space.
words = S.words A.write
>>> Stream.fold Fold.toList $ Unicode.words $ Stream.fromList "A  newline\nis considered white space?"
[fromList "A",fromList "newline",fromList "is",fromList "considered",fromList "white",fromList "space?"]
Fold each word of the stream using the supplied Fold and stream the result.
>>> Stream.fold Fold.toList $ words Fold.toList (Stream.fromList "fold these     words")
["fold","these","words"]
words = Stream.wordsBy isSpace
Pre-release
Split a string into words.
words takes Text and splits it into the list by words. Actual type of this function is the following:
words :: Text -> [Text]
but it was given a more complex type to provide friendlier compile time errors.
>>> words ""
[]

>>> words "one line"
["one","line"]

>>> words "   >_<   "
[">_<"]

>>> words ("string words" :: String)
...
... 'words' works with 'Text', not 'String'.
Possible fixes:
1. Make sure OverloadedStrings extension is enabled.
2. Apply 'toText' to a single value.
3. Apply 'map toText' to the list value.
...

>>> words True
...
... 'words' works with 'Text'
But given: 'Bool'
...
Split an infinite string into words, by any isSpace symbol.
Not on Stackage, so not searched. Cross-platform access to a list of words
Implements word movements. Copyright (c) Hans-Peter Deifel