Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

trim text

    function myTrim(subjectDesc) {

        if (subjectDesc.length > 55) {
            return subjectDesc.toString().substring(0, 55) + "...";
        } else {
            return subjectDesc;
        }

    }
 
PREVIOUS NEXT
Tagged: #trim #text
ADD COMMENT
Topic
Name
2+9 =