Manage Learn to apply best practices and optimize your operations.

@Explode equivalent in JavaScript

The following script mimics the @Explode function in the Notes formula language

The following script mimics the @Explode function in the Notes formula language.

 function explode(inputstring, separators, includeEmpties) { inputstring = new String(inputstring); separators = new String(separators); if(separators == "undefined") { separators = " :;"; } fixedExplode = new Array(1); currentElement = ""; count = 0; for(x=0; x < inputstring.length; x++) { char = inputstring.charAt(x); if(separators.indexOf(char) != -1) { if ( ( (includeEmpties <= 0) || (includeEmpties == false)) && (currentElement == "")) { } else { fixedExplode[count] = currentElement; count++; currentElement = ""; } } else { currentElement += char; } } if (( ! (includeEmpties <= 0) && (includeEmpties != false)) || (currentElement != "")) { fixedExplode[count] = currentElement; } return fixedExplode; }

Dig Deeper on Domino Resources - Part 2

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close