]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /*============================================================================= |
2 | Copyright (c) 2013 Daniel James | |
3 | ||
4 | Use, modification and distribution is subject to the Boost Software | |
5 | License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | |
6 | http://www.boost.org/LICENSE_1_0.txt) | |
7 | =============================================================================*/ | |
8 | ||
7c673cae | 9 | #include <stdexcept> |
11fdf7f2 | 10 | #include "string_view.hpp" |
7c673cae FG |
11 | |
12 | namespace quickbook | |
13 | { | |
14 | struct glob_error : std::runtime_error | |
15 | { | |
11fdf7f2 | 16 | explicit glob_error(char const* error) : std::runtime_error(error) {} |
7c673cae FG |
17 | }; |
18 | ||
19 | // Is this path a glob? Throws glob_error if glob is invalid. | |
b32b8144 | 20 | bool check_glob(quickbook::string_view); |
7c673cae FG |
21 | |
22 | // pre: glob is valid (call check_glob first on user data). | |
11fdf7f2 TL |
23 | bool glob( |
24 | quickbook::string_view const& pattern, | |
25 | quickbook::string_view const& filename); | |
7c673cae | 26 | |
11fdf7f2 | 27 | std::size_t find_glob_char(quickbook::string_view, std::size_t start = 0); |
b32b8144 | 28 | std::string glob_unescape(quickbook::string_view); |
7c673cae | 29 | } |