RockstarLang / rockstar

Home of the Rockstar programming language
https://codewithrockstar.com/
GNU Affero General Public License v3.0
6.88k stars 223 forks source link

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

Open stevebrown2600 opened 3 months ago

stevebrown2600 commented 3 months ago

"abcabcd" % "ab" = "ccd"

caseyc37 commented 3 months ago

"babab" % "bab" = ???

"ba" or "ab"?

stevebrown2600 commented 3 months 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.