Mercurial > hg > orthanc-stone
comparison Resources/Orthanc/Core/Toolbox.h @ 206:795d71f66f31
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 29 Mar 2018 10:09:03 +0200 |
parents | 03afbee0cc7b |
children |
comparison
equal
deleted
inserted
replaced
205:886230938339 | 206:795d71f66f31 |
---|---|
77 { | 77 { |
78 }; | 78 }; |
79 | 79 |
80 namespace Toolbox | 80 namespace Toolbox |
81 { | 81 { |
82 class LinesIterator | |
83 { | |
84 private: | |
85 const std::string& content_; | |
86 size_t lineStart_; | |
87 size_t lineEnd_; | |
88 | |
89 void FindEndOfLine(); | |
90 | |
91 public: | |
92 LinesIterator(const std::string& content); | |
93 | |
94 bool GetLine(std::string& target) const; | |
95 | |
96 void Next(); | |
97 }; | |
98 | |
99 | |
82 void ToUpperCase(std::string& s); // Inplace version | 100 void ToUpperCase(std::string& s); // Inplace version |
83 | 101 |
84 void ToLowerCase(std::string& s); // Inplace version | 102 void ToLowerCase(std::string& s); // Inplace version |
85 | 103 |
86 void ToUpperCase(std::string& result, | 104 void ToUpperCase(std::string& result, |
212 | 230 |
213 void FinalizeGlobalLocale(); | 231 void FinalizeGlobalLocale(); |
214 | 232 |
215 std::string ToUpperCaseWithAccents(const std::string& source); | 233 std::string ToUpperCaseWithAccents(const std::string& source); |
216 #endif | 234 #endif |
235 | |
236 std::string GenerateUuid(); | |
217 } | 237 } |
218 } | 238 } |
239 | |
240 | |
241 | |
242 | |
243 /** | |
244 * The plain C, opaque data structure "OrthancLinesIterator" is a thin | |
245 * wrapper around Orthanc::Toolbox::LinesIterator, and is only used by | |
246 * "../Resources/WebAssembly/dcdict.cc", in order to avoid code | |
247 * duplication | |
248 **/ | |
249 | |
250 struct OrthancLinesIterator; | |
251 | |
252 OrthancLinesIterator* OrthancLinesIterator_Create(const std::string& content); | |
253 | |
254 bool OrthancLinesIterator_GetLine(std::string& target, | |
255 const OrthancLinesIterator* iterator); | |
256 | |
257 void OrthancLinesIterator_Next(OrthancLinesIterator* iterator); | |
258 | |
259 void OrthancLinesIterator_Free(OrthancLinesIterator* iterator); |