Skip to main content

stringToArray

Splits a string to an array based on the delimiter passed.

Parameters

  • string string to convert to array
  • delimiter string character where to split the string

Examples

stringToArray('apple;banana;orange', ';');
// => ['apple', 'banana', 'orange']

Returns array of the split string.

Meta

  • version: 1.0.0