ISibboI / evalexpr

A powerful expression evaluation crate 🦀.
GNU Affero General Public License v3.0
320 stars 52 forks source link

add str::substring #158

Closed lovasoa closed 11 months ago

lovasoa commented 11 months ago

@ISibboI , the usize overflow was already handled, but I changed the behavior to raise an error instead of returning an empty string when supplied indices are out of bounds. Let me know if that's ok :)

ISibboI commented 11 months ago

Also, in case I get to implement #159 before merging this, it may be good to use it as well. But I can also do that.

ISibboI commented 11 months ago

Yeah, now you can use wrong_function_argument_amount_range instead of wrong_function_argument_amount to report that the new function can handle two or three arguments.

lovasoa commented 11 months ago

Okay, I'm leaving this in your hands. thanks !

lovasoa commented 11 months ago

Thank you 🙏