18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

trim the variable

jeesonmathewjeesonmathew Members
edited April 2011 in Sahi - Open Source
May I know how to remove the white space from the variable. I used trim(), but I got following error..
TypeError: Cannot find function trim in object
Pls help.

Comments

  • the following code looks good:

    trim($line);

    function trim(str) {
    return str.replace(/^\s+|\s+$/g,"");
    }
Sign In or Register to comment.