String interpolation works to in this case. 👍
I am used to (s)printf when
I want to translate string which contains variables with gettext and also to format float.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
For the fourth one, I rather prefer string interpolation.
I like string interpolation too whenever I can get away with it.
String interpolation gets weird if your string contains quotes, though
vs
Of course one could write it this way
At the end and in this case, whatever works best/is the easiest to write and read.
sprintf
with many vars is a pain to read.String interpolation works to in this case. 👍
I am used to
(s)printf
whenI want to translate string which contains variables with gettext and also to format float.