JSON-RPC 2.0
JSON-RPC 2.0 Modern C++ Library
Loading...
Searching...
No Matches
string_utils.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cctype>
4
#include <ranges>
5
#include <string>
6
#include <string_view>
7
8
namespace
jsonrpc::utils
{
9
10
auto
Trim
(std::string_view in) -> std::string {
11
auto
view = in | std::views::drop_while(::isspace) | std::views::reverse |
12
std::views::drop_while(::isspace) | std::views::reverse;
13
return
{view.begin(), view.end()};
14
}
15
16
}
// namespace jsonrpc::utils
jsonrpc::utils
Definition
string_utils.hpp:8
jsonrpc::utils::Trim
auto Trim(std::string_view in) -> std::string
Definition
string_utils.hpp:10
include
jsonrpc
utils
string_utils.hpp
Generated by
1.11.0