Mercurial > hg > orthanc
diff Core/Uuid.cpp @ 402:d2c69150a979
bulk storescu
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 30 Apr 2013 11:50:51 +0200 |
parents | bdd72233b105 |
children | 08eca5d86aad |
line wrap: on
line diff
--- a/Core/Uuid.cpp Tue Apr 30 10:57:00 2013 +0200 +++ b/Core/Uuid.cpp Tue Apr 30 11:50:51 2013 +0200 @@ -96,6 +96,28 @@ } + bool StartsWithUuid(const std::string& str) + { + if (str.size() < 36) + { + return false; + } + + if (str.size() == 36) + { + return IsUuid(str); + } + + assert(str.size() > 36); + if (!isspace(str[36])) + { + return false; + } + + return IsUuid(str.substr(0, 36)); + } + + static std::string CreateTemporaryPath(const char* extension) { #if BOOST_HAS_FILESYSTEM_V3 == 1