trimdent: A utility for neat multiline string trimming

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Please see the README on GitHub at https://github.com/gregorias/trimdent#readme


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.0
Change log None available
Dependencies base (>=4.13 && <5) [details]
License AGPL-3.0-only
Copyright Copyright (c) 2021 Grzegorz Milka
Author Grzegorz Milka
Maintainer grzegorzmilka@gmail.com
Category String
Home page https://github.com/gregorias/trimdent#readme
Bug tracker https://github.com/gregorias/trimdent/issues
Source repo head: git clone https://github.com/gregorias/trimdent
Uploaded by gregorias at 2021-07-28T09:14:17Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for trimdent-0.1.0.0

[back to package description]

trimdent

Trimdent is a simple library for for smartly trimming and unindenting strings.

>>> import Text.RawString.QQ (r)
>>> trimdent [r|func add(x int, y int) int {
                  return x + y
                }
             |]
"func add(x int, y int) int {\n\
\  return x + y\n\
\}"

Why is this useful?

This library is useful when you are writing your own quasi quoter and want to sanitize whitespace.

How does it compare to other libraries?