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