Recently, I’ve been hearing that string.format(formatstring, ...) is more efficient than concatenate (..). Is it true and why? Should we use string.format() everywhere or there are places where we should use concatenate as well?
Concatenation could also be pleasing to look at for some people, but that’s not the point. I asked why is it better and where should we mostly use it. Plus, I’m not here to talk about which one looking visually pleasing. If there were no differences, I could’ve easily done this:
local function format(formatstring: string, ...)
return (formatstring .. (...)); -- This is wrong, but you know what I tried to mean here.
end;
Yeah, I guess that’s right. Doing stuff with string.format() will be easier so it won’t just error. Sorry if I sounded a bit harsh. Thanks for the info.