SeqAn3
The Modern C++ library for sequence analysis.
to_lower.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 
18 #include <seqan3/std/ranges>
19 
20 namespace seqan3::view
21 {
22 
67 inline auto const to_lower = deep{std::view::transform([] (auto const in) noexcept
68 {
69  static_assert(Char<remove_cvref_t<decltype(in)>>,
70  "The value type of seqan3::view::to_lower must model seqan3::Char.");
71  return seqan3::to_lower(in);
72 })};
73 
75 
76 } // namespace seqan3::view
This concept encompasses exactly the types char, signed char, unsigned char, wchar_t, char16_t and char32_t.
Provides seqan3::view::deep.
Adaptations of concepts from the Ranges TS.
auto const to_lower
A view that calls seqan3::to_lower() on each element in the input range.
Definition: to_lower.hpp:67
The SeqAn3 namespace for views.
Provides utilities for modifying characters.
Core alphabet concept and free function/type trait wrappers.
A wrapper type around an existing view adaptor that enables "deep view" behaviour for that view...
Definition: deep.hpp:101
constexpr auto transform
A range adaptor that takes a invocable and returns a view of the elements with the invocable applied...
Definition: ranges:911
constexpr char_type to_lower(char_type const c) noexcept
Converts &#39;A&#39;-&#39;Z&#39; to &#39;a&#39;-&#39;z&#39; respectively; other characters are returned as is.
Definition: transform.hpp:82