outerspace 0.2.1

Methods for prefixing and suffixing the non-whitespace characters in a string.
Documentation
  • Coverage
  • 100%
    4 out of 4 items documented4 out of 4 items with examples
  • Size
  • Source code size: 6.71 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.14 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • stefee/outerspace-rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • stefee

outerspace-rs

Crates.io version Crates.io downloads docs.rs docs

This is the Rust version of the outerspace JavaScript package.

Methods for prefixing and suffixing the non-whitespace characters in a string.

Examples

let prefixed = outerspace::prefix_non_whitespace("\n\nHello hello\n\n", "> ");
assert_eq!(prefixed, "\n\n> Hello hello\n\n");
let suffixed = outerspace::suffix_non_whitespace("\n\nHello hello\n\n", "!");
assert_eq!(suffixed, "\n\nHello hello!\n\n");
let wrapped = outerspace::wrap_non_whitespace("\n\nHello hello\n\n", "**", "**");
assert_eq!(wrapped, "\n\n**Hello hello**\n\n");