Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MystPi/dedent
🔧 Remove shared indentation from a string
https://github.com/MystPi/dedent
dedent gleam indentation string utility
Last synced: 27 days ago
JSON representation
🔧 Remove shared indentation from a string
- Host: GitHub
- URL: https://github.com/MystPi/dedent
- Owner: MystPi
- License: apache-2.0
- Created: 2024-04-20T17:22:42.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-04-20T17:26:57.000Z (8 months ago)
- Last Synced: 2024-11-13T06:16:19.227Z (29 days ago)
- Topics: dedent, gleam, indentation, string, utility
- Language: Gleam
- Homepage:
- Size: 7.81 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-gleam - dedent - [📚](https://hexdocs.pm/dedent/) - Remove shared indentation from a string (Packages / Text)
README
# dedent
Remove shared indentation from a string.
[![Package Version](https://img.shields.io/hexpm/v/dedent)](https://hex.pm/packages/dedent)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/dedent/)```sh
gleam add dedent
``````gleam
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:
```gleam
"I am at level one* level two
- level two
- level three> That's it!"
```Further documentation can be found at .
## Development
```sh
gleam run # Run the project
gleam test # Run the tests
gleam shell # Run an Erlang shell
```