]> Creatis software - creaCLI.git/blob - bbtk_Slicer_PKG/src/CreationTool.h
27dcb8222bade35a5cfdae9151fca0470cbecc36
[creaCLI.git] / bbtk_Slicer_PKG / src / CreationTool.h
1 /* 
2  * File:   CreationTool.h
3  * Author: riveros
4  *
5  * Created on 23 mars 2012, 10:12
6  */
7
8 #ifndef CREATIONTOOL_H
9 #define CREATIONTOOL_H
10
11 #include <string>
12 #include <iostream>
13 #include <sstream>
14
15 namespace Mthd {
16
17     class Aux {
18     public:
19         static std::string toString ( float n ) ;
20         static std::string toString ( double n ) ;
21         static std::string toString ( long double n ) ;
22
23         static std::string toString ( char n ) ;
24         static std::string toString ( unsigned char n ) ;
25
26         static std::string toString ( short n ) ;
27         static std::string toString ( unsigned short n ) ;
28
29         static std::string toString ( int n ) ;
30         static std::string toString ( long int n ) ;
31         static std::string toString ( unsigned int n ) ;
32         static std::string toString ( unsigned long n ) ;
33         static std::string toString ( unsigned long long n ) ;
34
35         static std::string toString ( std::string n ) ;
36
37         static char* toCharArrray ( float n ) ;
38         static char* toCharArrray ( double n ) ;
39         static char* toCharArrray ( long double n ) ;
40
41         static char* toCharArrray ( char n ) ;
42         static char* toCharArrray ( unsigned char n ) ;
43
44         static char* toCharArrray ( short n ) ;
45         static char* toCharArrray ( unsigned short n ) ;
46
47         static char* toCharArrray ( int n ) ;
48         static char* toCharArrray ( long int n ) ;
49         static char* toCharArrray ( unsigned int n ) ;
50         static char* toCharArrray ( long unsigned int n ) ;
51
52         static char* toCharArrray ( std::string n ) ;
53
54         static bool str_ends_with ( std::string total_str , std::string sub_str ) ;
55         static std::string replace_str ( std::string input , std::string old_str , std::string new_str ) ;      
56
57     } ;
58
59 } ;
60
61
62
63 #endif  /* CREATIONTOOL_H */
64