#string #display

strmath

Do math with your strings

9 releases (4 breaking)

0.7.0 Dec 4, 2024
0.6.2 Jul 30, 2024
0.5.0 Jun 11, 2024
0.4.1 Mar 26, 2024

#378 in Math

Download history 18/week @ 2024-09-16 21/week @ 2024-09-30 11/week @ 2024-10-07 142/week @ 2024-12-02

142 downloads per month

MIT license

22KB
510 lines

Under Recontruction

TBA


lib.rs:

A simple library for weird string manipulation techniques.

Strmath is a library that provides a simple way to manipulate strings in a weird way. Such as:

  • Adding a string to another string or anything that implements the trait Display.
  • Subtracting a string from another string.
  • Multiplying a string with another string/chars.
  • Dividing a string with another string/chars.

Glossary

  • Str: The main struct that holds the string.
  • Ops: The module that holds the operations.

Str

The main struct that holds the string. It is just a simple wrapper around the String struct.

use strmath::Str;
let s = Str::from("Hello, ");
let x = Str::from("World!");
let y = s + x;

assert_eq!(y, "Hello, World!".into());

Dependencies

~160KB