This is probably because strings are immutable. Methods with ! work by modifying the container passed to them, but you can’t modify a string in Julia (for performance reasons).
You could always make an issue asking for this feature. That said, one critical difference between a function like filter and a function like findfirst is that the latter always returns a result which can be described by a single start and end index, while the former can require extensive auxiliary space to store the result (e.g. filter(x->x=='0', "0110010101010") )
Sorry, I’m coming across wrong. I’m new to Julia and am learning why the design of the language is in certain ways. My asking was not an expectation of conformation to a structure, but an inquiry for better understanding, challenging my intuition. I couldn’t find anything in the documentation explaining, so I thought I’d ask.
Throw an error I suppose.
Again, not expecting a change from my question. Just looking for understanding, and strings being immutable for performance makes sense. Thanks!
And likewise for filter! as per my original post, yes.
I was thinking an error that mentions an inappropriate attempt to mutate an immutable object, rather than no method defined for that combination of input variable types.