I’m sure there is some logical reason, but anyone know why with occursin() the search term is the first argument and with startswith(), the search term is the second argument? Doesn’t that make it hard to remember?
Yes, I agree that in retrospect, that makes sense and I should have been able to figure it out, but just using logic or intuition hasn’t been that useful to figure out the syntax in Julia because if I were to do that, I think the following would make way more sense
findall( "b", occursin(data))
or more simply
findall( x -> occursion("b", x), data)
But, either way, it’s still better than Python so I’ll keep trying
Well, I respectfully disagree I don’t think these make sense at all. The first one is unclear, but the second obviously checks if "b" is one of the elements of data, which it isn’t. I mean, what else could it mean?
occursin surely has to to work on each element ofdata, not on the data as a whole.