X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/f7db8b6f34919e5548c39479ed5a5471bae39e5b..df4733677cb16642b53628d22e4d927aadad8b27:/Server/src/string.cpp diff --git a/Server/src/string.cpp b/Server/src/string.cpp index 7062bb0..cd2eaad 100644 --- a/Server/src/string.cpp +++ b/Server/src/string.cpp @@ -32,29 +32,38 @@ # include #endif // DEBUG -const std::string PlaQui::Server::String::SPACE_CHARS = " \t\n\r"; +using namespace std; -PlaQui::Server::String::~String(void) { +namespace PlaQui { + +namespace Server { + +const string String::SPACE_CHARS = " \t\n\r"; + +String::~String(void) { } -PlaQui::Server::String::String(const std::string& str): - std::string(str.c_str()) { +String::String(const string& str): + string(str.c_str()) { } -PlaQui::Server::String& PlaQui::Server::String::trim( - const PlaQui::Server::String& clist) { +String& String::trim(const String& clist) { erase(0, find_first_not_of(clist)); erase(find_last_not_of(clist) + 1); return *this; } -PlaQui::Server::String& PlaQui::Server::String::to_lower(void) { - std::transform(begin(), end(), begin(), tolower); +String& String::to_lower(void) { + transform(begin(), end(), begin(), ::tolower); return *this; } -PlaQui::Server::String& PlaQui::Server::String::to_upper(void) { - std::transform(begin(), end(), begin(), toupper); +String& String::to_upper(void) { + transform(begin(), end(), begin(), ::toupper); return *this; } +} // namespace Server + +} // namespace PlaQui +