Categories

Blog Archive

Live Traffic Feed

In:

Trim a string in JavaScript

This is the best trim function for JavaScript that I found while surfing the net.

var trimmed = str.replace(/^\s+|\s+$/g, '') ;
source

5 comments:

JoShMaRie said...

hello reynold ;)

reynold -tagaBUKID- said...

hi

Miong said...

nidot bai.nindot!

JoShMaRie said...

yan si hot chick pa rin. gandang hapon :)

arzed said...

Thanks for the visit