23 N_(
"True when the first input starts with the second")},
28 N_(
"True when the first input ends with the second")},
33 N_(
"True when the first input contains the second as a substring")},
34 {0,
nullptr, 0,
nullptr,
nullptr},
44 "The string to find in the input string");
50 static auto fn = mf::build::SI3_SO<std::string, int, std::string, bool>(
51 "Starts With", [](
const std::string &a,
const int mode,
const std::string &
b) {
77 item->identifier !=
nullptr;
80 if (item->name !=
nullptr && item->identifier[0] !=
'\0') {
83 bNode &node = params.add_node(
"FunctionNodeMatchString");
84 params.update_and_connect_available_socket(node,
"String");
85 bke::node_find_socket(node, SOCK_IN,
"Operation")
86 ->default_value_typed<bNodeSocketValueMenu>()
87 ->value = int(operation);
96 bNode &node =
params.add_node(
"FunctionNodeMatchString");
97 params.update_and_connect_available_socket(node,
"Result");
120 ntype.
ui_name =
"Match String";
121 ntype.
ui_description =
"Check if a given string exists within another string";
#define NODE_CLASS_CONVERTER
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) 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 startswith(StringRef prefix) const
constexpr bool endswith(StringRef suffix) const
void set_matching_fn(const mf::MultiFunction *fn)
bool is_default_link_socket
void node_register_type(bNodeType &ntype)
static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms)
static void node_declare(NodeDeclarationBuilder &b)
static void node_build_multi_function(NodeMultiFunctionBuilder &builder)
static void node_register()
static void node_label(const bNodeTree *, const bNode *node, char *label, int label_maxncpy)
const EnumPropertyItem rna_enum_node_match_string_items[]
void fn_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
bool RNA_enum_name(const EnumPropertyItem *item, const int value, const char **r_name)
std::string ui_description
void(* labelfunc)(const bNodeTree *ntree, const bNode *node, char *label, int label_maxncpy)
NodeMultiFunctionBuildFunction build_multi_function
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
NodeDeclareFunction declare