Skip to content

Function isolateSubstring() ​

isolateSubstring(string: string, searchValue: string): string[]

Source: string.utils.ts

Splits a string into an array of substrings where all substrings matching searchValue are separate items.

Parameters ​

string ​

string

The string to split.

searchValue ​

string

The value to isolate from other substrings.

Returns ​

string[]

An array of substrings matching searchValue and the rest of the string.

Built by Prozilla