Aight, I’ve ran into something I’m fairly curious about and I’m sure would soon arise to be a problem for me. I’ve never been great with string functions etc, so sorry if this is quite an obvious question:
How can I split a string (with spaces) based on capitalisation? For example:
Here I have a bunch of Items who’s names are joined together for easy script access. However when displaying the Item name to the screen I’d like it to be spaced out for better readability.
(CandyBar
would be shown as Candy Bar
, WoodenSword
as Wooden Sword
… you get the idea.)
The answer would be to insert a space before each capital letter (there are other ways but I’d like to have this process be done automatically) but I have no clue how I’d do this with roblox’s string functions. If anyone can help I’d greatly appreciate it
(Never posted this many questions in 1 week lol)