AGPL-3.0-only licensed by Grzegorz Milka
Maintained by [email protected]
This version can be pinned in stack with:trimdent-0.1.0.0@sha256:b338a43850b182399eed7effb561d24a577dd839e3d7bc15c215ad560a795847,3942

Module documentation for 0.1.0.0

Depends on 1 package(full list with versions):

trimdent

Trimdent is a simple library 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?

  • Neat-interpolation exposes the same functionality but only in an interpolating quasi quoter. This means that you can’t easily use it in your own quoters.
  • raw-strings-qq gives quasi quoters to express multi-line strings, but they don’t do any trimming.