-BigInteger easyStringToBI(const std::string &s) {
- return (s[0] == '-') ?
- BigInteger(easyStringToBU(s.substr(1, s.length() - 1)), BigInteger::negative) :
- BigInteger(easyStringToBU(s));
+BigInteger stringToBigInteger(const std::string &s) {
+ // Recognize a sign followed by a BigUnsigned.
+ return (s[0] == '-') ? BigInteger(stringToBigUnsigned(s.substr(1, s.length() - 1)), BigInteger::negative)
+ : (s[0] == '+') ? BigInteger(stringToBigUnsigned(s.substr(1, s.length() - 1)))
+ : BigInteger(stringToBigUnsigned(s));