Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] String Interpolation #3646

Open
zachlindsey opened this issue Apr 15, 2024 · 0 comments
Open

[ENH] String Interpolation #3646

zachlindsey opened this issue Apr 15, 2024 · 0 comments

Comments

@zachlindsey
Copy link

Summary

It would be nice if there was an interface StringInterpolate that allowed something like the following:

interpolate = utility.StringInterpolate()

interpolate.inputs.input_string = "{greeting}, {name}!"
interpolate.inputs.greeting = "Hello"
interpolate.inputs.name = "Nipype"

res = interpolate.run()

assert res.outputs.output_string == "Hello, Nipype!"

Only input_string is required, the rest are simply added.
This is especially handy as an input to a CommandLine node, where the args are supplied by other nodes.

@zachlindsey zachlindsey changed the title [ENH] String Interplation [ENH] String Interpolation Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant