Mercurial > hg > orthanc
diff Core/Toolbox.cpp @ 1430:ad94a3583b07
Plugins can send answers as multipart messages
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 29 Jun 2015 17:47:34 +0200 |
parents | 0a355eeeb351 |
children | 8dc80ba768aa |
line wrap: on
line diff
--- a/Core/Toolbox.cpp Mon Jun 29 14:43:08 2015 +0200 +++ b/Core/Toolbox.cpp Mon Jun 29 17:47:34 2015 +0200 @@ -1233,5 +1233,20 @@ break; } } + + + bool Toolbox::StartsWith(const std::string& str, + const std::string& prefix) + { + if (str.size() < prefix.size()) + { + return false; + } + else + { + return str.compare(0, prefix.size(), prefix) == 0; + } + } + }