andThenYouDie

Automation, IT and more.

08 Sep 2011

Add a Word at the End of a Chain

Little javascript scriptlet used in OO, to add a word at the end of a chain if you find a first specific letter.


if ( (scriptletInput.charAt(0) == P) || (scriptletInput.charAt(0) == p) ){
                scriptletResult=scriptletInput+_prod;
} else {
                        scriptletResult=scriptletInput;
}