I'm looking for a function that will remove new line characters etc from a string.
I tried formatString in a java script operator but get an error.
' Process.myString is " Test \n"
Process.myString2=formatString(" %s/n",Process.myString);
I get this error:
-- Can't find method com.optinuity.c2o.bean.C2OLibrary.formatString(string,string). (c2ojslib.js#1)
myString.trim(); also doesn't work.
Use the standard javascript string replace method.
Process.myString2 = Process.myString.replace(/\n/gm, "")