dedent
Remove shared indentation from a string.
gleam add dedent
import gleam/io
import dedent.{dedent}
pub fn main() {
"
I am at level one
* level two
- level two
- level three
> That's it!
"
|> dedent
|> io.println
}
Result:
"I am at level one
* level two
- level two
- level three
> That's it!"
Further documentation can be found at https://hexdocs.pm/dedent.
Development
gleam run # Run the project
gleam test # Run the tests
gleam shell # Run an Erlang shell