Mercurial > hg > orthanc
comparison OrthancFramework/Sources/Toolbox.cpp @ 4622:9086aeb9d9d2 db-changes
RestApiCallDocumentation::SetAnswerHeader() and Toolbox::RemoveSurroundingQuotes()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 16 Apr 2021 10:48:57 +0200 |
parents | 31f940334496 |
children | dbee8bd8ee1f |
comparison
equal
deleted
inserted
replaced
4621:82dbe45c947a | 4622:9086aeb9d9d2 |
---|---|
2383 Json::StreamWriterBuilder builder; | 2383 Json::StreamWriterBuilder builder; |
2384 builder.settings_["indentation"] = " "; | 2384 builder.settings_["indentation"] = " "; |
2385 target = Json::writeString(builder, source); | 2385 target = Json::writeString(builder, source); |
2386 #endif | 2386 #endif |
2387 } | 2387 } |
2388 | |
2389 | |
2390 void Toolbox::RemoveSurroundingQuotes(std::string& value) | |
2391 { | |
2392 if (!value.empty() && | |
2393 value[0] == '\"' && | |
2394 value[value.size() - 1] == '\"') | |
2395 { | |
2396 value = value.substr(1, value.size() - 2); | |
2397 } | |
2398 } | |
2388 } | 2399 } |
2389 | 2400 |
2390 | 2401 |
2391 | 2402 |
2392 OrthancLinesIterator* OrthancLinesIterator_Create(const std::string& content) | 2403 OrthancLinesIterator* OrthancLinesIterator_Create(const std::string& content) |