readUnsignedInt requires isDigit which is not imported. readSignedInt does s.read.peek which wont compile. Given this issue was not raised in 5 years, they should just be removed IMO. Otherwise, fix them so they work, and they return an Optional value, which should be none on int overflow.