heck icon indicating copy to clipboard operation
heck copied to clipboard

Case-insensitive equality/ordering

Open SOF3 opened this issue 5 years ago • 1 comments

Is it practical to compare strings in a snek-case-insensitive manner? I would like to know whether two strings are convertible to the same SnekCase/CamelCase/etc. without allocating a new String to hold the intermediates. Can heck's internal methods, such as transform, help with such needs?

SOF3 avatar Oct 09 '20 06:10 SOF3

This is an interesting idea and I think would be feasible to implement in heck, though transform in its current form won't help AFAICT. If you could investiage a bit yourself and create a draft of how this could work, that would help towards getting this into the crate.

jplatte avatar Dec 29 '20 14:12 jplatte