Oracle Application dicussion and support forum

June 18, 2007

Trim SR numbers and other parameters in JSP

Filed under: Oracle, iSupport, service request — admin @ 5:02 pm
This can be used to trimming SR or other data that is passed to JSP’s

function trim(strText) {
    // this will get rid of leading spaces
    while (strText.substring(0,1) == ‘ ‘)
        strText = strText.substring(1, strText.length);

    // this will get rid of trailing spaces
    while (strText.substring(strText.length-1,strText.length) == ‘ ‘)
        strText = strText.substring(0, strText.length-1);

   return strText;
}

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress