Sequoia
Loading...
Searching...
No Matches
Patterns.hpp
Go to the documentation of this file.
1
2// Copyright Oliver J. Rosten 2021. //
3// Distributed under the GNU GENERAL PUBLIC LICENSE, Version 3.0. //
4// (See accompanying file LICENSE.md or copy at //
5// https://www.gnu.org/licenses/gpl-3.0.en.html) //
7
8#pragma once
9
14#include <string>
15
16namespace sequoia
17{
20 [[nodiscard]]
21 std::pair<std::string::size_type, std::string::size_type>
22 find_matched_delimiters(std::string_view s, char open, char close, std::string::size_type pos={});
23
24 [[nodiscard]]
25 std::pair<std::string::size_type, std::string::size_type>
26 find_sandwiched_text(std::string_view s, std::string_view leftPattern, std::string_view rightPattern, std::string::size_type pos={});
27}
std::pair< std::string::size_type, std::string::size_type > find_matched_delimiters(std::string_view text, const char open, const char close, std::string::size_type pos)
Definition: Patterns.cpp:19