Fanyun

Results 1 comments of Fanyun

const atoi = (str) => { const trimStr = str.replace(/(^\s*)|(\s*$)/g, '') if(!/^[\d|-]/g.test(trimStr)) return 0 const matchStr = /(-)?\d+/g.exec(trimStr) const result = parseInt(matchStr) if(result < 0 && result < -(2 **...