Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace gnu_np {
- inline int
- stoi(const string& __str, size_t* __idx = 0, int __base = 10)
- { return __gnu_cxx::__stoa<long, int>(&std::strtol, "stoi", __str.c_str(),
- __idx, __base); }
- inline short
- stos(const string& __str, size_t* __idx = 0, int __base = 10)
- { return __gnu_cxx::__stoa<long, short>(&std::strtol, "stos", __str.c_str(),
- __idx, __base); }
- inline char
- stoc(const string& __str, size_t* __idx = 0, int __base = 10)
- { return __gnu_cxx::__stoa<long, char>(&std::strtol, "stoc", __str.c_str(),
- __idx, __base); }
- inline unsigned
- stou(const string& __str, size_t* __idx = 0, int __base = 10)
- { return __gnu_cxx::__stoa<unsigned long, unsigned>(&std::strtoul, "stou", __str.c_str(),
- __idx, __base); }
- inline unsigned short
- stous(const string& __str, size_t* __idx = 0, int __base = 10)
- { return __gnu_cxx::__stoa<unsigned long, unsigned short>(&std::strtoul, "stous", __str.c_str(),
- __idx, __base); }
- inline unsigned char
- stouc(const string& __str, size_t* __idx = 0, int __base = 10)
- { return __gnu_cxx::__stoa<unsigned long, unsigned char>(&std::strtoul, "stouc", __str.c_str(),
- __idx, __base); }
- } // namespace gnu_np
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement