JavaScript Strings

The following tutorials cover String Operations in JavaScript.

Basics

ADVERTISEMENT

Checks

Updates

  • JavaScript – Append a string with suffix string
  • JavaScript – Append a string with prefix string
  • JavaScript – Concatenate strings JavaScript Tutorial to concatenate two or more strings using string.concat() method.
  • JavaScript – Concatenate string and number
  • JavaScript – Insert character at specific index
  • JavaScript – Repeat string N times JavaScript Tutorial to create a string that is repeated N times from the given string.

Split Operations

Transformations

Delete Operations

Search

  • JavaScript – Count number of occurrences of substring in a string
  • JavaScript – Count number of overlapping occurrences of substring in a string
  • JavaScript – Find the Index of substring in string JavaScript Tutorial to find the index of given substring in the string using string.indexOf() method.
  • JavaScript – Find index of substring in a string
  • JavaScript – Find index of last occurrence of substring in a string
  • JavaScript – Find index of nth occurrence of substring in a string
  • JavaScript – Find indexes of all occurrences of given substring in a string

Matchings

  • JavaScript – Find all the matches of a Regular Expression in a string JavaScript Tutorial to find all the substrings in the given string that match the specified regular expression, using string.match() method.
  • JavaScript – Check if string matches given regular expression
  • JavaScript – Count number of substrings that match given regular expression
  • JavaScript – Get all substrings that match given regular expression

Replacements

  • JavaScript – Replace a substring in string JavaScript Tutorial to replace the first occurrence of specified substring in the string, with a replacement string.
  • JavaScript – Replace all occurrences of a substring in string JavaScript Tutorial to replace all the occurrences of specified substring in the string, with a replacement string.
  • JavaScript – Replace last occurrence of substring in string JavaScript Tutorial to replace the last occurrence of specified substring in the string, with a replacement string.
  • JavaScript – Replace first substring that match with given regular expression
  • JavaScript – Replace last substring that match with given regular expression
  • JavaScript – Replace all substrings that match with given regular expression

Sorting

Filtering

Formating

  • JavaScript – Format string JavaScript Tutorial to format a string.
  • JavaScript – Variable inside a string

Conversions

Exceptions

  • JavaScript – Substring index out of bounds
  • JavaScript – Get char at index – index out of bounds