SeqAn3
3.0.2
The Modern C++ library for sequence analysis.
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
pretty_print.hpp
Go to the documentation of this file.
1
// -----------------------------------------------------------------------------------------------------
2
// Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
3
// Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik
4
// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5
// shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6
// -----------------------------------------------------------------------------------------------------
7
13
#pragma once
14
15
#include <
string
>
16
17
#include <
seqan3/core/platform.hpp
>
18
19
namespace
seqan3::detail
20
{
21
22
// ----------------------------------------------------------------------------
23
// make_printable
24
// ----------------------------------------------------------------------------
25
48
inline
std::string
make_printable(
char
const
c)
49
{
50
switch
(c)
51
{
52
case
'\0'
:
return
"'\\0'"
;
53
case
'\t'
:
return
"'\\t'"
;
54
case
'\n'
:
return
"'\\n'"
;
55
case
'\v'
:
return
"'\\v'"
;
56
case
'\f'
:
return
"'\\f'"
;
57
case
'\r'
:
return
"'\\r'"
;
58
case
static_cast<
char
>
(127):
return
"'DEL'"
;
59
default
:
60
{
61
if
((c >=
static_cast<
char
>
(1) && c <=
static_cast<
char
>
(8)) ||
62
(c >=
static_cast<
char
>
(14) && c <=
static_cast<
char
>
(31)))
63
return
"'CTRL'"
;
64
else
65
return
{
'\''
, c,
'\''
};
66
}
67
}
68
}
69
70
}
// namespace seqan3::detail
std::string
platform.hpp
Provides platform and dependency checks.
string
Version:
main_user
main_dev
3.4.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.2
3.0.1
3.0.0
seqan3
core
char_operations
pretty_print.hpp
Generated on Thu Dec 3 2020 18:58:18 for SeqAn3 by
1.8.20