]> Creatis software - gdcm.git/blob - src/gdcmUtil.h
ENH: If possible move the stl include after the gdcm ones, to avoid vc warnings
[gdcm.git] / src / gdcmUtil.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmUtil.h,v $
5   Language:  C++
6   Date:      $Date: 2004/10/08 04:43:38 $
7   Version:   $Revision: 1.33 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*/
18
19 #ifndef GDCMUTIL_H
20 #define GDCMUTIL_H
21
22 #include "gdcmCommon.h"
23 #include <vector>
24 #include <string>
25
26
27 /**
28  * \defgroup Globals Utility functions
29  * \brief    Here are some utility functions, belonging to NO class,
30  *           dealing with strings, file names... that can be called
31  *           from anywhere by whomsoever they can help.
32  */
33
34 //-----------------------------------------------------------------------------
35 GDCM_EXPORT void Tokenize (const std::string& str,
36                           std::vector<std::string>& tokens,
37                           const std::string& delimiters = " ");
38 GDCM_EXPORT int  CountSubstring (const std::string& str,
39                                  const std::string& subStr);       
40
41 GDCM_EXPORT std::string CreateCleanString(std::string s);
42 GDCM_EXPORT void        NormalizePath(std::string &name);
43 GDCM_EXPORT std::string GetPath(std::string &fullName);
44 GDCM_EXPORT std::string GetName(std::string &fullName);
45 //-----------------------------------------------------------------------------
46 #endif