Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.
/ stripmargin Public archive

Simple but elegant multiline string in Rust à la Scala.

License

Notifications You must be signed in to change notification settings

rami3l/stripmargin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stripmargin

Downloads License crates.io docs.rs

A little Rust library that enables you to write multiline strings à la Scala.

Usage

use stripmargin::StripMargin;

// Use '|' to set left margin, 
// and then `.strip_margin()` :)
```rust
assert_eq!(
    r#"Hello,
      |  world!
      |"#
    .strip_margin(),
    "Hello,\n  world!\n",
);

About

Simple but elegant multiline string in Rust à la Scala.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages