bloblang: format
string manipulation method percent escape
#1691
-
Dear Developers, Dear Community, the documentation of the Furthermore, if a URL with a query string needs formatting, many percent symbols may need to be escaped. Thus, I would like to ask if the formatting symbol could be made customizable (with a default being the percent symbol)? Thank You |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey @gramian, thanks for pointing that out! I added some extra information to the While I can see that in some situations it might be desirable to use another character instead of |
Beta Was this translation helpful? Give feedback.
Hey @gramian, thanks for pointing that out! I added some extra information to the
format
method docs in #1728 to link the Go documentation of thefmt
package which lists the valid verbs (as well as the fact that%%
resolves to a literal percent sign.While I can see that in some situations it might be desirable to use another character instead of
%
to specify verbs, it will introduce extra complexity which can be confusing and error-prone. I think calling something likereplace_all("%", "%%")
should be acceptable in most cases. Please share a detailed example if you're aware of a situation where this doesn't work well.