I am not necessarily working on a game but I would love to learn a bit more about roblox programming.
So my question is how I would create my own format function.
It would go like this, for example:
Label.Text = "Welcome {} to {}. My name is {}!":format(Player.Name, "Jailbreak", "David")
--or
Label.Text = format("{}, woah so {}", God, Cool)
You could string.split by {} and concatenate with the arguments you give it.
You could string.gsub to replace {} with %s and then use the built in formatter.
Or you could use string.gmatch to match everything between each set of {} and then again concatenate with the arguments you’ve given.
Whatever floats your boat.
Though it seems a pointless exercise to write your own formatting function. If it’s for problem solving and scripting practice it makes more sense to try to come up with the solution yourself, otherwise it’s just practice for everyone else on the forum and all you do is implement what we’ve told you.