lua-patterns icon indicating copy to clipboard operation
lua-patterns copied to clipboard

Exposing Lua string patterns to Rust

Results 4 lua-patterns issues
Sort by recently updated
recently updated
newest added

TL;DR: my code crashes if I remove unrelated `printf`, and `cargo miri` complains, which together look very much like some UB in unsafe code. I haven't yet dug into this,...

Investigating https://github.com/stevedonovan/lua-patterns/issues/2 more, it sees like this repository doesn't contain the latest verison, published to crates.io.

In lua, there's \0 at the end, but we don't have one, so *ep is UB

``` use lua_patterns::LuaPattern; fn main() { let mut m = LuaPattern::from_bytes(&[160]); let s = "⚠"; s.bytes().for_each(|b| println!("{}" , b)); m.gsub(s , ""); } ``` The ⚠ is made up of...