LibCarna Version 3.4.0
Loading...
Searching...
No Matches
text.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010 - 2016 Leonid Kostrykin
3 *
4 * Chair of Medical Engineering (mediTEC)
5 * RWTH Aachen University
6 * Pauwelsstr. 20
7 * 52074 Aachen
8 * Germany
9 *
10 *
11 * Copyright (C) 2021 - 2025 Leonid Kostrykin
12 *
13 */
14
15#ifndef TEXT_H_6014714286
16#define TEXT_H_6014714286
17
18#include <LibCarna/LibCarna.hpp>
19#include <string>
20#include <sstream>
21
27namespace LibCarna
28{
29
30namespace base
31{
32
36namespace text
37{
38
39
40
41// ----------------------------------------------------------------------------------
42// cat
43// ----------------------------------------------------------------------------------
44
48std::string LIBCARNA cat( const std::string& file );
49
50
51
52// ----------------------------------------------------------------------------------
53// lexical_cast
54// ----------------------------------------------------------------------------------
55
71template< typename To, typename From >
73{
74 To to;
75 std::stringstream ss;
76 ss << from;
77 ss >> to;
78 return to;
79}
80
81
82
83} // namespace LibCarna :: base :: text
84
85} // namespace LibCarna :: base
86
87} // namespace LibCarna
88
89#endif // TEXT_H_6014714286
Contains forward-declarations.
Represents an association.
To lexical_cast(const From &from)
Performs lexical cast.
Definition text.hpp:72
std::string cat(const std::string &file)
Reads file in text mode and returns contents.