Non-standard String generics have been removed

Published: | Categories: JavaScript

Description

The non-standard String generic methods, introduced with JavaScript 1.6 and deprecated since Firefox 53, have been removed with Firefox 68. This includes:

  • String.charAt
  • String.charCodeAt
  • String.concat
  • String.endsWith
  • String.includes
  • String.indexOf
  • String.lastIndexOf
  • String.localeCompare
  • String.match
  • String.normalize
  • String.replace
  • String.search
  • String.slice
  • String.split
  • String.startsWith
  • String.substr
  • String.substring
  • String.toLocaleLowerCase
  • String.toLocaleUpperCase
  • String.toLowerCase
  • String.toUpperCase
  • String.trim
  • String.trimLeft
  • String.trimRight

The String global object can be used as a simple alternative to the String generics. For example, String.replace(num, search, replace) can be replaced with String(num).replace(search, replace).

The following standard static methods will remain available:

  • String.fromCharCode
  • String.fromCodePoint
  • String.raw

The non-standard Array generic methods will also be removed in the near future.

References