SeqAn3  3.0.0
The Modern C++ library for sequence analysis.
take_line.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2019, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2019, 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 
17 
18 // ============================================================================
19 // view::take_line (adaptor instance definition)
20 // ============================================================================
21 
22 namespace seqan3::view
23 {
24 
80 inline auto constexpr take_line = view::take_until_and_consume(is_char<'\r'> || is_char<'\n'>);
81 
82 // ============================================================================
83 // view::take_line_or_throw (adaptor instance definition)
84 // ============================================================================
85 
92 inline auto constexpr take_line_or_throw = view::take_until_or_throw_and_consume(is_char<'\r'> || is_char<'\n'>);
93 
95 
96 } // namespace seqan3::view
auto constexpr take_until_or_throw_and_consume
A view adaptor that returns elements from the underlying range until the functor evaluates to true (t...
Definition: take_until.hpp:641
Provides seqan3::view::take_until and seqan3::view::take_until_or_throw.
auto constexpr take_line_or_throw
A view adaptor that returns a single line from the underlying range (throws if there is no end-of-lin...
Definition: take_line.hpp:92
The SeqAn3 namespace for views.
Provides character predicates for tokenisation.
auto constexpr take_until_and_consume
A view adaptor that returns elements from the underlying range until the functor evaluates to true (o...
Definition: take_until.hpp:627
auto constexpr take_line
A view adaptor that returns a single line from the underlying range or the full range if there is no ...
Definition: take_line.hpp:80