textwrap-macros-impl

Crates.iotextwrap-macros-impl
lib.rstextwrap-macros-impl
version0.3.0
sourcesrc
created_at2020-01-07 06:41:04.387879
updated_at2022-11-10 11:07:45.332331
descriptionSimple procedural macros to use textwrap utilities at compile time.
homepagehttps://github.com/althonos/textwrap-macros
repositoryhttps://github.com/althonos/textwrap-macros
max_upload_size
id196046
size10,723
Martin Larralde (althonos)

documentation

README

textwrap-macros Star me

Simple procedural macros to use textwrap utilities at compile time.

Actions Codecov License Source Crate Documentation Changelog

Usage

Add the textwrap-macros crate to the Cargo.toml manifest:

[dependencies]
textwrap-macros = "0.2"

Then either use the macros using the old-style #[macro_use] or import them as any other crate member:

use textwrap_macros::dedent;

const poem: &str = dedent!(r#"
      When we two parted
      In silence and tears,
      Half broken-hearted
      To sever for years,
      Pale grew thy cheek and cold,
      Colder thy kiss;
      Truly that hour foretold
      Sorrow to this.
"#);

Macros usage with small examples can be found on docs.rs. The following functions have been ported into macros:

Check out the documentation of the original library for more information about the behaviour of each of the wrapped functions.

Changelog

This project adheres to Semantic Versioning and provides a changelog in the Keep a Changelog format.

Commit count: 47

cargo fmt