3 ms·
It's true that they didn't violate the API documentation, but it's also true that (as your parent suggests) it probably would have been better if the API docume
by sanderjd 11y ago
It's true that they didn't violate the API documentation, but it's also true that (as your parent suggests) it probably would have been better if the API documentation had explicitly stated that `substring()` is O(1), such that this change would have been breaking. At the very least it would have made it more obvious, and at most it would have forced them to make a new method for the new behavior.