RockstarLang / rockstar

The Rockstar programming language specification
https://codewithrockstar.com/
MIT License
6.88k stars 221 forks source link

String modulus should be like string.strip() #339

Open stevebrown2600 opened 1 month ago

stevebrown2600 commented 1 month ago

"abcabcd" % "ab" = "ccd"

caseyc37 commented 1 month ago

"babab" % "bab" = ???

"ba" or "ab"?

stevebrown2600 commented 1 month ago

I guess whatever the norm is for string strip functions in other languages? I'd assume you go left to right, so "ab", but I don't think it's ever come up for me.