D
Deno

help

Is there a split_to_array function like join_to_string

Aalex-00911/6/2023
I need to split a string with some delimiter =[, and ask my self if there is something in deno which i can use for this. https://deno.land/std@0.205.0/collections/join_to_string.ts
Kking8fisher11/6/2023
Is this what you are looking for?
const str = "How is $everything g$oing?"
const breakpoint = /\$e|\$o/
const splitted = str.split(breakpoint)
// [ 'How is ', 'verything g', 'ing?' ]
const str = "How is $everything g$oing?"
const breakpoint = /\$e|\$o/
const splitted = str.split(breakpoint)
// [ 'How is ', 'verything g', 'ing?' ]
Mmarvinh.11/6/2023
adding for completeness: Splitting strings is part of the JavaScript language itself and doesn't require additional libraries. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split

Looking for more? Join the community!