inmost_utils.h 488 Bytes
Newer Older
Dmitry Bagaev's avatar
Dmitry Bagaev committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef INMOST_UTILS_H
#define INMOST_UTILS_H

#include <sstream>
#include <string>

namespace INMOST {

    template<typename T>
    T from_string(std::string str) {
        T v;
        std::istringstream ss(str);
        ss >> v;
        return v;
    }

Dmitry Bagaev's avatar
Dmitry Bagaev committed
17
18
19
20
21
22
23
    template<typename T>
    std::string to_string(T value) {
        std::stringstream ss;
        ss << value;
        return ss.str();
    }

Dmitry Bagaev's avatar
Dmitry Bagaev committed
24
25
    std::string string_to_lower(const std::string &str);

Dmitry Bagaev's avatar
Dmitry Bagaev committed
26
27
28
}

#endif //INMOST_UTILS_H