Skip to content

Instantly share code, notes, and snippets.

@TLMcode
Last active April 15, 2017 22:47
Show Gist options
  • Save TLMcode/4417950 to your computer and use it in GitHub Desktop.
Save TLMcode/4417950 to your computer and use it in GitHub Desktop.
jSplode() works sort of like Explode() in php as it allows you to use delimited strings to add and replace array items. It uses Javascript executed in ScriptControl object. Pretty straight forward usage parameters: String, Delimiter Returns an array with items separated by delimiter.
jSplode(str,del) {
;////////////////jSplode by TLM 12.31.12
sc:=ComObjCreate("ScriptControl"),sc.Language:="JScript"
js:="str='" str "';aR=str.split(""" del """);",sc.ExecuteStatement(js)
Return sc.Eval("aR")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment