LibCarna
Version 3.4.0
Loading...
Searching...
No Matches
include
LibCarna
base
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
27
namespace
LibCarna
28
{
29
30
namespace
base
31
{
32
36
namespace
text
37
{
38
39
40
41
// ----------------------------------------------------------------------------------
42
// cat
43
// ----------------------------------------------------------------------------------
44
48
std::string LIBCARNA
cat
(
const
std::string&
file
);
49
50
51
52
// ----------------------------------------------------------------------------------
53
// lexical_cast
54
// ----------------------------------------------------------------------------------
55
71
template
<
typename
To,
typename
From >
72
To
lexical_cast
(
const
From
&
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
LibCarna.hpp
Contains forward-declarations.
LibCarna::base::Association
Represents an association.
Definition
Association.hpp:48
LibCarna::base::text::lexical_cast
To lexical_cast(const From &from)
Performs lexical cast.
Definition
text.hpp:72
LibCarna::base::text::cat
std::string cat(const std::string &file)
Reads file in text mode and returns contents.
Written by Leonid Kostrykin © 2021–2025. Based on
Carna
(© 2010-2016).
Documentation generated by
Doxygen