Skip to content

Instantly share code, notes, and snippets.

@hankyates
Created April 9, 2014 06:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hankyates/10230737 to your computer and use it in GitHub Desktop.
Save hankyates/10230737 to your computer and use it in GitHub Desktop.
Javascript implementation of a string delimiter
// Write a function that takes in a string seperated by a seperator, and will return an array
// of strings in between the seperators.
var sampleInput = 'asdf$lskd1234$asdo';
stringDelemiter(sampleInput, '$');
// -> ['asdf', 'lskd1234', 'asdo']
@bbrooks
Copy link

bbrooks commented Apr 10, 2014

Typo:
stringDelemiter(sampleInput, '$');

should be

stringDelimiter(sampleInput, '$');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment