13 b.use_custom_socket_order();
14 b.allow_any_socket_order();
17 b.add_input<
decl::String>(
"Find").description(
"The string to find in the input string");
18 b.add_input<
decl::String>(
"Replace").description(
"The string to replace each match with");
29 std::string new_str{new_str_ptr};
36 static auto substring_fn = mf::build::SI3_SO<std::string, std::string, std::string, std::string>(
37 "Replace", [](
const std::string &
str,
const std::string &find,
const std::string &replace) {
48 ntype.
ui_name =
"Replace String";
49 ntype.
ui_description =
"Replace a given string segment with another";
#define NODE_CLASS_CONVERTER
#define FN_NODE_REPLACE_STRING
char * BLI_string_replaceN(const char *__restrict str, const char *__restrict substr_old, const char *__restrict substr_new) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
#define NOD_REGISTER_NODE(REGISTER_FUNC)
constexpr bool is_empty() const
constexpr const char * c_str() const
void set_matching_fn(const mf::MultiFunction *fn)
void MEM_freeN(void *vmemh)
void node_register_type(bNodeType &ntype)
static void node_declare(NodeDeclarationBuilder &b)
static std::string replace_all(const StringRefNull str, const StringRefNull from, const StringRefNull to)
static void node_build_multi_function(NodeMultiFunctionBuilder &builder)
static void node_register()
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
const char * enum_name_legacy
NodeDeclareFunction declare