Link Details

Link 75546 thumbnail
User 281268 avatar

By minidxer
via ntt.cc
Published: Apr 13 2008 / 23:57

another javascript function for trim a string from white space at the front.(It will need some change for RTrim and Trim),I don’t konw there is faster way than below
  • 9
  • 1
  • 1349
  • 209

Comments

Add your comment
User 204084 avatar

kenman replied ago:

0 votes Vote down Vote up Reply

Just use regex, no need to turn a 1-liner into a 19-liner.

User 236137 avatar

dzonelurker replied ago:

0 votes Vote down Vote up Reply

... unless you want a really fast solution for a standard task. You find several trim implementation comparisons on the Internet. Regex is not the fastest.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (9)



Voters Against This Link (1)