From: jpr Date: Thu, 25 Aug 2005 14:55:47 +0000 (+0000) Subject: Add methods to check the 'printability' of a bin area X-Git-Tag: Version1.2.bp~199 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=60fd8c21b0c2c57f5bd2bf7a38c04fff86d14dd7;p=gdcm.git Add methods to check the 'printability' of a bin area --- 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