2 ms·
FFS, just disallow empty search strings (and document it). int String::indexOf(String partial) { if (partial.length == 0) throw SomeNas
by stickfigure 3y ago
FFS, just disallow empty search strings (and document it).
int String::indexOf(String partial) {
if (partial.length == 0)
throw SomeNastyException();
}
No handwringing necessary.