HelenOS sources
This source file includes following definitions.
- stoi
- stol
- stoul
- stoll
- stoull
- stof
- stod
- stold
- to_string
- to_string
- to_string
- to_string
- to_string
- to_string
- to_string
- to_string
- to_string
- stoi
- stol
- stoul
- stoll
- stoull
- stof
- stod
- stold
- to_wstring
- to_wstring
- to_wstring
- to_wstring
- to_wstring
- to_wstring
- to_wstring
- to_wstring
- to_wstring
#include <cassert>
#include <string>
namespace std
{
int stoi(const string& str, size_t* idx, int base)
{
__unimplemented();
return 0;
}
long stol(const string& str, size_t* idx, int base)
{
char* end;
long result = ::strtol(str.c_str(), &end, base);
if (end != str.c_str())
{
if (idx)
*idx = static_cast<size_t>(end - str.c_str());
return result;
}
return 0;
}
unsigned long stoul(const string& str, size_t* idx, int base)
{
char* end;
unsigned long result = ::strtoul(str.c_str(), &end, base);
if (end != str.c_str())
{
if (idx)
*idx = static_cast<size_t>(end - str.c_str());
return result;
}
return 0;
}
long long stoll(const string& str, size_t* idx, int base)
{
__unimplemented();
return 0;
}
unsigned long long stoull(const string& str, size_t* idx, int base)
{
__unimplemented();
return 0;
}
float stof(const string& str, size_t* idx)
{
__unimplemented();
return 0.f;
}
double stod(const string& str, size_t* idx)
{
__unimplemented();
return 0.0;
}
long double stold(const string& str, size_t* idx)
{
__unimplemented();
return 0.0l;
}
string to_string(int val)
{
char* tmp;
::asprintf(&tmp, "%d", val);
std::string res{tmp};
free(tmp);
return res;
}
string to_string(unsigned val)
{
char* tmp;
::asprintf(&tmp, "%u", val);
std::string res{tmp};
free(tmp);
return res;
}
string to_string(long val)
{
char* tmp;
::asprintf(&tmp, "%ld", val);
std::string res{tmp};
free(tmp);
return res;
}
string to_string(unsigned long val)
{
char* tmp;
::asprintf(&tmp, "%lu", val);
std::string res{tmp};
free(tmp);
return res;
}
string to_string(long long val)
{
char* tmp;
::asprintf(&tmp, "%lld", val);
std::string res{tmp};
free(tmp);
return res;
}
string to_string(unsigned long long val)
{
char* tmp;
::asprintf(&tmp, "%llu", val);
std::string res{tmp};
free(tmp);
return res;
}
string to_string(float val)
{
char* tmp;
::asprintf(&tmp, "%f", val);
std::string res{tmp};
free(tmp);
return res;
}
string to_string(double val)
{
char* tmp;
::asprintf(&tmp, "%f", val);
std::string res{tmp};
free(tmp);
return res;
}
string to_string(long double val)
{
char* tmp;
::asprintf(&tmp, "%Lf", val);
std::string res{tmp};
free(tmp);
return res;
}
int stoi(const wstring& str, size_t* idx, int base)
{
__unimplemented();
return 0;
}
long stol(const wstring& str, size_t* idx, int base)
{
__unimplemented();
return 0;
}
unsigned long stoul(const wstring& str, size_t* idx, int base)
{
__unimplemented();
return 0;
}
long long stoll(const wstring& str, size_t* idx, int base)
{
__unimplemented();
return 0;
}
unsigned long long stoull(const wstring& str, size_t* idx, int base)
{
__unimplemented();
return 0;
}
float stof(const wstring& str, size_t* idx)
{
__unimplemented();
return 0.f;
}
double stod(const wstring& str, size_t* idx)
{
__unimplemented();
return 0.0;
}
long double stold(const wstring& str, size_t* idx)
{
__unimplemented();
return 0.0l;
}
wstring to_wstring(int val)
{
__unimplemented();
return wstring{};
}
wstring to_wstring(unsigned val)
{
__unimplemented();
return wstring{};
}
wstring to_wstring(long val)
{
__unimplemented();
return wstring{};
}
wstring to_wstring(unsigned long val)
{
__unimplemented();
return wstring{};
}
wstring to_wstring(long long val)
{
__unimplemented();
return wstring{};
}
wstring to_wstring(unsigned long long val)
{
__unimplemented();
return wstring{};
}
wstring to_wstring(float val)
{
__unimplemented();
return wstring{};
}
wstring to_wstring(double val)
{
__unimplemented();
return wstring{};
}
wstring to_wstring(long double val)
{
__unimplemented();
return wstring{};
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wliteral-suffix"
inline namespace literals {
inline namespace string_literals
{
string operator "" s(const char* str, size_t len)
{
return string{str, len};
}
u16string operator "" s(const char16_t* str, size_t len)
{
return u16string{str, len};
}
u32string operator "" s(const char32_t* str, size_t len)
{
return u32string{str, len};
}
}}
#pragma GCC diagnostic pop
}
HelenOS homepage, sources at GitHub