此代码修剪空白,(仅供参考:它被认为非常快)
function wSpaceTrim(s){
var start = -1,
end = s.length;
while (s.charCodeAt(--end) < 33 ); //here
while (s.charCodeAt(++start) < 33 ); //here also
return s.slice( start, end + 1 );
}
while 循环没有括号,我如何正确地将括号添加到此代码中?
while(iMean){
// like this;
}
非常感谢!