const-str icon indicating copy to clipboard operation
const-str copied to clipboard

Todo List

Open Nugine opened this issue 2 years ago • 7 comments

New API:

  • [x] compare!
  • [x] strip_prefix!
  • [X] strip_suffix!
  • [ ] lines!
  • [x] join!
  • [ ] split_ascii_whitespace!
  • [x] sorted!

Docs:

  • [ ] API docs translation

Upstream issues:

Nugine avatar Feb 05 '23 17:02 Nugine

I don't suppose I could bribe you with $20 USD to do join!? It would help a lot in a niche personal project I'm working on

Also I assume the intent is to take an array and/or slice of string literals and a joiner string? I can't imagine it'd be anything else but I just want to be sure

Scripter17 avatar Feb 06 '24 09:02 Scripter17

I don't suppose I could bribe you with $20 USD to do join!? It would help a lot in a niche personal project I'm working on

Also I assume the intent is to take an array and/or slice of string literals and a joiner string? I can't imagine it'd be anything else but I just want to be sure

Yes. The intent is to take string slices and concat them using a specified separator. I'll give it a try since someone needs it.

Nugine avatar Feb 06 '24 12:02 Nugine

Managed to make it partially work, but not with slices.

macro_rules! join {
    (join=$join:expr, $x:expr) => ($x);
    (join=$join:expr, $x:expr, $($y:expr),+) => {
        concat!($x, $join, join!(join=$join, $($y),+))
    };
}

Scripter17 avatar Feb 07 '24 01:02 Scripter17

https://docs.rs/const-str/0.5.7/const_str/macro.join.html

Nugine avatar Mar 05 '24 07:03 Nugine

I currently do not have $20 to give you. I swear I'm not just going back on the promise; Just give me until April.

Scripter17 avatar Mar 05 '24 08:03 Scripter17

Finally have the money. Do you have a paypal account?

Scripter17 avatar Mar 29 '24 09:03 Scripter17

Finally have the money. Do you have a paypal account?

See https://github.com/Nugine#sponsor. Thank you!

Nugine avatar Mar 29 '24 12:03 Nugine