24 const int pos = text.
find(token, 0);
36 const int match_len = token.
size();
47 static auto token_position_count = mf::build::SI2_SO2<std::string, std::string, int, int>(
49 [](
const std::string &text,
const std::string &token,
int &first,
int &
count) ->
void {
62 ntype.
ui_name =
"Find in String";
64 "Find the number of times a given string occurs in another string and the position of the "
#define NODE_CLASS_CONVERTER
#define FN_NODE_FIND_IN_STRING
size_t BLI_strnlen_utf8_ex(const char *strc, size_t strc_maxlen, size_t *r_len_bytes) ATTR_NONNULL(1
#define NOD_REGISTER_NODE(REGISTER_FUNC)
static constexpr int64_t not_found
constexpr int64_t find(char c, int64_t pos=0) const
constexpr bool is_empty() const
constexpr int64_t size() const
constexpr const char * data() const
void set_matching_fn(const mf::MultiFunction *fn)
void node_register_type(bNodeType &ntype)
static void node_build_multi_function(NodeMultiFunctionBuilder &builder)
static void node_register()
static int string_count(const StringRef text, const StringRef token)
static int string_find(const StringRef text, const StringRef token)
static void node_declare(NodeDeclarationBuilder &b)
void fn_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
std::string ui_description
NodeMultiFunctionBuildFunction build_multi_function
NodeDeclareFunction declare