Bitcoin Core
21.99.0
P2P Digital Currency
src
util
spanparsing.h
Go to the documentation of this file.
1
// Copyright (c) 2018-2019 The Bitcoin Core developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5
#ifndef BITCOIN_UTIL_SPANPARSING_H
6
#define BITCOIN_UTIL_SPANPARSING_H
7
8
#include <
span.h
>
9
10
#include <string>
11
#include <vector>
12
13
namespace
spanparsing
{
14
20
bool
Const
(
const
std::string& str,
Span<const char>
& sp);
21
28
bool
Func
(
const
std::string& str,
Span<const char>
& sp);
29
37
Span<const char>
Expr
(
Span<const char>
& sp);
38
46
std::vector<Span<const char>>
Split
(
const
Span<const char>
& sp,
char
sep);
47
48
}
// namespace spanparsing
49
50
#endif // BITCOIN_UTIL_SPANPARSING_H
spanparsing::Split
std::vector< Span< const char > > Split(const Span< const char > &sp, char sep)
Split a string on every instance of sep, returning a vector.
Definition:
spanparsing.cpp:51
spanparsing::Func
bool Func(const std::string &str, Span< const char > &sp)
Parse a function call.
Definition:
spanparsing.cpp:23
Span
A Span is an object that can refer to a contiguous sequence of objects.
Definition:
span.h:92
span.h
spanparsing::Const
bool Const(const std::string &str, Span< const char > &sp)
Parse a constant.
Definition:
spanparsing.cpp:14
spanparsing::Expr
Span< const char > Expr(Span< const char > &sp)
Extract the expression that sp begins with.
Definition:
spanparsing.cpp:32
spanparsing
Definition:
spanparsing.cpp:12
Generated on Wed Apr 21 2021 20:03:55 for Bitcoin Core by
1.8.17