24 N_(
"True when the first input starts with the second")},
29 N_(
"True when the first input ends with the second")},
34 N_(
"True when the first input contains the second as a substring")},
35 {0,
nullptr, 0,
nullptr,
nullptr},
47 .
description(
"The string to find in the input string");
53 static auto fn = mf::build::SI3_SO<std::string, MenuValue, std::string, bool>(
54 "Starts With", [](
const std::string &a,
const MenuValue mode,
const std::string &
b) {
81 if (item->name !=
nullptr && item->identifier[0] !=
'\0') {
84 bNode &node = params.add_node(
"FunctionNodeMatchString"_ustr);
85 params.update_and_connect_available_socket(node,
"String"_ustr);
86 bke::node_find_socket(node, SOCK_IN,
"Operation"_ustr)
87 ->default_value_typed<bNodeSocketValueMenu>()
88 ->value = int(operation);
111 name =
N_(
"Unknown");
121 ntype.
ui_name =
"Match String";
122 ntype.
ui_description =
"Check if a given string exists within another string";
#define NODE_CLASS_CONVERTER
#define NOD_REGISTER_NODE(REGISTER_FUNC)
constexpr bool startswith(StringRef prefix) const
static constexpr int64_t not_found
constexpr int64_t find(char c, int64_t pos=0) const
constexpr bool endswith(StringRef suffix) const
void add_item(std::string socket_name, SocketLinkOperation::LinkSocketFn fn, int weight=0)
const bNodeTree & node_tree() const
const bNodeSocket & other_socket() const
eNodeSocketInOut in_out() const
void update_and_connect_available_socket(bNode &new_node, UString socket_name)
bNode & add_node(UString idname)
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[]
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
bool RNA_enum_name(const EnumPropertyItem *item, const int value, const char **r_name)
void common_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
bke::bNodeTreeType * typeinfo
bool(*) validate_link(eNodeSocketDatatype from, eNodeSocketDatatype to)
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