renamed "toString()" to "to_string()"

This commit is contained in:
Niels 2015-01-04 20:50:28 +01:00
parent f63ff7727e
commit 3bef1a5097
4 changed files with 14 additions and 14 deletions

View file

@ -477,7 +477,7 @@ json::operator object_t() const
return get<object_t>();
}
const std::string json::toString() const noexcept
const std::string json::to_string() const noexcept
{
switch (_type)
{
@ -511,7 +511,7 @@ const std::string json::toString() const noexcept
{
result += ", ";
}
result += i->toString();
result += i->to_string();
}
return "[" + result + "]";
@ -527,7 +527,7 @@ const std::string json::toString() const noexcept
{
result += ", ";
}
result += "\"" + i->first + "\": " + i->second.toString();
result += "\"" + i->first + "\": " + i->second.to_string();
}
return "{" + result + "}";

View file

@ -181,13 +181,13 @@ class json
/// write to stream
friend std::ostream& operator<<(std::ostream& o, const json& j)
{
o << j.toString();
o << j.to_string();
return o;
}
/// write to stream
friend std::ostream& operator>>(const json& j, std::ostream& o)
{
o << j.toString();
o << j.to_string();
return o;
}
@ -205,7 +205,7 @@ class json
}
/// explicit conversion to string representation (C++ style)
const std::string toString() const noexcept;
const std::string to_string() const noexcept;
/// add an object/array to an array
json& operator+=(const json&);