+/**
+ * \ingroup Util
+ * \brief Create a /DICOM/ string:
+ * It should a of even lenght (no odd length ever)
+ * It can contains as many \0 as you want.
+ * This function is similar to DicomString(const char*),
+ * except it doesn't take a lenght.
+ * It only pad with a null character if length is odd
+ */
+std::string Util::DicomString(const char* s)
+{
+ size_t l = strlen(s);
+ if( l%2 )
+ {
+ l++;
+ }
+ std::string r(s, s+l);
+ assert( !(r.size() % 2) );
+ return r;
+}
+
+/**
+ * \ingroup Util
+ * \brief Create a /DICOM/ string:
+ * It should a of even length (no odd length ever)
+ * It can contains as many \0 as you want.
+ */
+std::string Util::DicomString(const char* s, size_t l)
+{
+ std::string r(s, s+l);
+ assert( !(r.size() % 2) );
+ return r;
+}