-
Notifications
You must be signed in to change notification settings - Fork 4
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
Wish: base version of glue::glue() #153
Comments
For reference, Link to discussion on R-devel. Link jumps you to the middle of the discussion where the beginning of a discussion into glue-style string interpolation comes up. Think there are some other similar threads around the same time as well. |
If there's interest in supporting format strings using a In Instead of having the base language implement some special formatting, perhaps it could set aside a generic so that you could create your own object to dispatch on: glue"{a} {b} {c}"
# equivalent to
# .Primitive("str_format")(glue, "{a} {b} {c}") Then if str_format.glue(fmt, value) {
glue::glue(value)
} This would also mean that you could generate a formatter object with configurable settings: whisker <- glue::glue_fmt(.open = "{{", .close = "}}")
whisker"hello, {{whisker_user}}!" |
It would be neat if there was a function in base that did something like
where
g()
provides the same functionality asglue::glue()
.Strings with variable interpolation support.
Always feels like something you shouldn't need to load a whole extra package for.
The text was updated successfully, but these errors were encountered: