Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What are the weird things in quotation marks when formatting a string?

Asked by
blockmask 374 Moderation Voter
5 years ago
Edited 5 years ago

Sometimes, when I look at other people's scripts, I usually see something like string.format("%d:%d", something, something), and I am really confused on what those in quotation marks represent. I don't know what they're called, and I tried looking them up to see what they are but I haven't found a single website that explained even the slightest about what they are.

Can anybody in the comments explain to me what they do? And if there is an article, please give a link

Thanks in advance

0
It's called string MageMasterHD 261 — 5y
0
..No, like what are those percent signs and the letters after it blockmask 374 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

https://developer.roblox.com/articles/string-patterns-reference

0
Thank you so much blockmask 374 — 5y
Ad
Log in to vote
0
Answered by 5 years ago
print(string.format("%s,%s,%s", 1, 2, 3))

Output --> 1,2,3

%s is a tag that is replaced with the following argument

Answer this question