Skip to content

Instantly share code, notes, and snippets.

@sburbidg
Created July 16, 2014 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sburbidg/0841900c9f0c4016cce1 to your computer and use it in GitHub Desktop.
Save sburbidg/0841900c9f0c4016cce1 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
</body>
</html>
function stringDelimiter(input, delim){
this.init = function(){
this.input = input
this.delim = delim
this.array = []
this.store = []
this.strng = ''
// this.done = false
for(i = 0; i <= this.input.length; i++){
if(this.input.charAt(i) != delim) {this.store.push(this.input.charAt(i))
} else {
for(d = 0; d <= this.store.length; d++){
this.strng += this.store.pop()
}
this.array.push(this.strng)
this.strng = ''
}
}
}
}
n = new stringDelimiter('imlitifjkstilokdtkmdoit', 't')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment