Loading...
Searching...
No Matches
predicate.hpp
Go to the documentation of this file.
// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: BSD-3-Clause
#pragma once
#include <seqan3/utility/char_operations/predicate_detail.hpp>
// ----------------------------------------------------------------------------
// General Purpose Char predicates
// ----------------------------------------------------------------------------
namespace seqan3
{
template <uint8_t interval_first, uint8_t interval_last>
requires (interval_first <= interval_last)
inline constexpr auto is_in_interval = detail::is_in_interval_type<interval_first, interval_last>{};
template <int char_v>
inline constexpr auto is_char = detail::is_char_type<char_v>{};
inline constexpr auto is_eof = is_char<EOF>;
inline constexpr auto is_cntrl = is_in_interval<'\0', static_cast<char>(31)> || is_char<static_cast<char>(127)>;
inline constexpr auto is_print = is_in_interval<' ', '~'>;
inline constexpr auto is_space = is_in_interval<'\t', '\r'> || is_char<' '>;
inline constexpr auto is_blank = is_char<'\t'> || is_char<' '>;
inline constexpr auto is_graph = is_in_interval<'!', '~'>;
inline constexpr auto is_punct =
is_in_interval<'!', '/'> || is_in_interval<':', '@'> || is_in_interval<'[', '`'> || is_in_interval<'{', '~'>;
inline constexpr auto is_alnum = is_in_interval<'0', '9'> || is_in_interval<'A', 'Z'> || is_in_interval<'a', 'z'>;
inline constexpr auto is_alpha = is_in_interval<'A', 'Z'> || is_in_interval<'a', 'z'>;
inline constexpr auto is_upper = is_in_interval<'A', 'Z'>;
inline constexpr auto is_lower = is_in_interval<'a', 'z'>;
inline constexpr auto is_digit = is_in_interval<'0', '9'>;
inline constexpr auto is_xdigit = is_in_interval<'0', '9'> || is_in_interval<'A', 'F'> || is_in_interval<'a', 'f'>;
} // namespace seqan3
seqan3::is_eof
constexpr auto is_eof
Checks whether a given letter is equal to the EOF constant defined in <cstdio>.
Definition predicate.hpp:72
seqan3::is_blank
constexpr auto is_blank
Checks whether c is a blank character.
Definition predicate.hpp:139
seqan3::is_digit
constexpr auto is_digit
Checks whether c is a digital character.
Definition predicate.hpp:259
seqan3::is_alpha
constexpr auto is_alpha
Checks whether c is a graphic character.
Definition predicate.hpp:211
seqan3::is_char
constexpr auto is_char
Checks whether a given letter is the same as the template non-type argument.
Definition predicate.hpp:60
seqan3::is_print
constexpr auto is_print
Checks whether c is a printable character.
Definition predicate.hpp:101
seqan3::is_space
constexpr auto is_space
Checks whether c is a space character.
Definition predicate.hpp:122
seqan3::is_xdigit
constexpr auto is_xdigit
Checks whether c is a hexadecimal character.
Definition predicate.hpp:277
seqan3::is_upper
constexpr auto is_upper
Checks whether c is a upper case character.
Definition predicate.hpp:227
seqan3::is_cntrl
constexpr auto is_cntrl
Checks whether c is a control character.
Definition predicate.hpp:87
seqan3::is_in_interval
constexpr auto is_in_interval
Checks whether a given letter is in the specified interval.
Definition predicate.hpp:44
seqan3::is_lower
constexpr auto is_lower
Checks whether c is a lower case character.
Definition predicate.hpp:243
seqan3
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
predicate_detail.hpp
Provides parse conditions for tokenization.
Hide me