6 #ifndef IROHA_AMETSUCHI_EXECUTOR_COMMON_HPP 7 #define IROHA_AMETSUCHI_EXECUTOR_COMMON_HPP 20 std::vector<std::string_view>
splitId(std::string_view
id);
22 std::vector<std::string_view>
split(std::string_view str,
23 std::string_view delims);
27 std::string_view
const str, std::string_view
const delims =
"@#") {
28 std::array<std::string_view, C> output;
30 auto it_first = str.data();
31 auto it_second = str.data();
32 auto it_end = str.data() + str.size();
35 while (it_first != it_end && counter < C) {
36 it_second = std::find_first_of(
37 it_first, it_end, std::cbegin(delims), std::cend(delims));
39 output[counter++] = std::string_view(it_first, it_second - it_first);
40 it_first = it_second != it_end ? it_second + 1ull : it_end;
47 #endif // IROHA_AMETSUCHI_EXECUTOR_COMMON_HPP Definition: block_query.hpp:17
std::array< std::string_view, C > staticSplitId(std::string_view const str, std::string_view const delims="@#")
Definition: executor_common.hpp:26
std::string_view getDomainFromName(std::string_view account_id)
Definition: executor_common.cpp:20
std::vector< std::string_view > splitId(std::string_view id)
Definition: executor_common.cpp:25
std::vector< std::string_view > split(std::string_view str, std::string_view delims)
Definition: executor_common.cpp:29
const std::string kRootRolePermStr
Definition: executor_common.cpp:15