string to integer

watch out overflow, remember str.trim