Intl.Collator - includes(), startsWith() and search()

I'm wanting to submit a proposal to add locale-sensitive string operations to Intl.Collator, in particular startsWith(), includes() and search(). Current String.prototype functions don't work well with some text, such as STRASSE and straße

Brief "documentation" follows:

  • startsWith(text, searchString, position) - returns true, if searchString starts the text at position, false otherwise. position is 0, if undefined.
  • includes(text, searchString, position) - returns true, if searchString is anywhere in the text from position onwards (inclusive), false otherwise. position is 0, if undefined.
  • search(text, searchString, position) - returns an iterator, whose values are an object with {index, match } with index being the index into the text, and match being the found substring. position is 0, if undefined.

From reading the contributing documentation, provided there are no objections here and someone is willing to champion this, my next step is to create a pull-request and incorporate feedback from here?

These all seem reasonable for the Intl specs, though there are more methods like endsWith and indexOf/lastIndexOf, etc.

Your best bet to get a champion is probably to open an issue on ECMA 402 (the Intl standard): https://github.com/tc39/ecma402/blob/97c16d6a26425c2166e426d3b242233865012911/CONTRIBUTING.md, or to attend one of the monthly meetings.