Honestly, after a while I though this could be just an issue with phrasing. What I was going for was the word "anything". I was tought that there's a big difference between "all" and "any". Like in methods "allMatch" and "anyMatch". And my initial idea was that you just pick any arbitrary char and split.
View all comments
Show parent comment
8
u/GustavoCinque Dec 29 '21 edited Dec 29 '21
It's working for me.Edit: This now returns what OP expects. The first version only returned the count of the biggest zero sequence.