From 60fd8c21b0c2c57f5bd2bf7a38c04fff86d14dd7 Mon Sep 17 00:00:00 2001 From: jpr Date: Thu, 25 Aug 2005 14:55:47 +0000 Subject: [PATCH] Add methods to check the 'printability' of a bin area --- src/gdcmUtil.cxx | 63 ++++++++++++++++++++++++++++++++++++++++++++++-- src/gdcmUtil.h | 7 ++++-- 2 files changed, 66 insertions(+), 4 deletions(-) diff --git a/src/gdcmUtil.cxx b/src/gdcmUtil.cxx index bf200b0d..b9db1c16 100644 --- a/src/gdcmUtil.cxx +++ b/src/gdcmUtil.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmUtil.cxx,v $ Language: C++ - Date: $Date: 2005/08/22 16:17:54 $ - Version: $Revision: 1.159 $ + Date: $Date: 2005/08/25 14:55:47 $ + Version: $Revision: 1.160 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -179,6 +179,41 @@ int Util::CountSubstring (const std::string &str, return count; } +/** + * \brief Checks whether a 'string' is printable or not (in order + * to avoid corrupting the terminal of invocation when printing) + * @param s string to check + */ +bool Util::IsCleanString(std::string const &s) +{ + std::cout<< std::endl << s << std::endl; + for(unsigned int i=0; i