• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

SOLVED Any string function that works in a similar way to "string_format"?

Misael644

Member
So, suppose I have a string of numbers whose value is "1234". I want only the first two digits, "12". Or another string whose value is 6. I want it to be 06. I thought about using the "string_format" function, but it's not exactly what I want. I want to use to make timers in the hh:mm:ss format. Is there a function that I can use for do what I said?
 

TsukaYuriko

☄️
Forum Staff
Moderator
You can use string_copy to copy a portion of a string for the former.

For the latter, you can use string_format in conjunction with string_replace_all to turn the spaces it creates into zeroes.
 
Top