12 b.add_input<
decl::String>(
N_(
"Find")).description(
N_(
"The string to find in the input string"));
14 .description(
N_(
"The string to replace each match with"));
22 if (
from.is_empty()) {
26 std::string new_str{new_str_ptr};
34 "Replace", [](
const std::string &
str,
const std::string &find,
const std::string &replace) {
#define FN_NODE_REPLACE_STRING
#define NODE_CLASS_CONVERTER
void nodeRegisterType(struct bNodeType *ntype)
char * BLI_str_replaceN(const char *__restrict str, const char *__restrict substr_old, const char *__restrict substr_new) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
constexpr const char * c_str() const
void set_matching_fn(const MultiFunction *fn)
void(* MEM_freeN)(void *vmemh)
static void fn_node_replace_string_declare(NodeDeclarationBuilder &b)
static std::string replace_all(const StringRefNull str, const StringRefNull from, const StringRefNull to)
static void fn_node_replace_string_build_multi_function(NodeMultiFunctionBuilder &builder)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_fn_replace_string()
void fn_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
NodeMultiFunctionBuildFunction build_multi_function
NodeDeclareFunction declare