}
//-----------------------------------------------------------------------------
-gdcmVR * gdcmGlobal::VR = (gdcmVR*)0;
-gdcmTS * gdcmGlobal::TS = (gdcmTS*)0;
-gdcmDictSet * gdcmGlobal::Dicts = (gdcmDictSet*)0;
+gdcmVR *gdcmGlobal::VR = (gdcmVR *)0;
+gdcmTS *gdcmGlobal::TS = (gdcmTS *)0;
+gdcmDictSet *gdcmGlobal::Dicts = (gdcmDictSet *)0;
gdcmGlobal gdcmGlob;
gdcmGlobal::gdcmGlobal(void) {
delete Dicts;
}
-gdcmVR * gdcmGlobal::GetVR(void) {
+gdcmVR *gdcmGlobal::GetVR(void) {
return VR;
}
-gdcmTS * gdcmGlobal::GetTS(void) {
+gdcmTS *gdcmGlobal::GetTS(void) {
return TS;
}
-gdcmDictSet * gdcmGlobal::GetDicts(void) {
+gdcmDictSet *gdcmGlobal::GetDicts(void) {
return Dicts;
}
///////////////////////////////////////////////////////////////////////////
// to prevent a flashing screen when non-printable character
-char * _cleanString(char *v) {
+char *_cleanString(char *v) {
char *d;
int i, l;
l = strlen(v);
for (i=0,d=v;
- i<l ;
- i++,d++) {
- if (!isprint(*d))
+ i<l ;
+ i++,d++) {
+ if (!isprint(*d))
*d = '.';
- }
+ }
return v;
}
///////////////////////////////////////////////////////////////////////////
// to prevent a flashing screen when non-printable character
std::string _CreateCleanString(std::string s) {
- std::string str=s;
- for(int i=0;i<str.size();i++)
- {
- if(!isprint(str[i]))
- str[i]='.';
- }
-
- return(str);
-}
+ std::string str=s;
+
+ for(int i=0;i<str.size();i++)
+ {
+ if(!isprint(str[i]))
+ str[i]='.';
+ }
+
+ if(str.size()>0)
+ if(!isprint(s[str.size()-1]))
+ if(s[str.size()-1]==0)
+ str[str.size()-1]=' ';
+
+ return(str);
+}