Can I print scoreboard value with leading 0's? [closed]

There is definitely not a built-in way to do this. I thought a while about what workarounds there might be, but I've found none, except the obvious:

/execute if score <selector> <objective> matches 100..999 run tellraw <selector> [{"text":"000"},{"score":"<selector>","objective":"<objective>"}]
/execute if score <selector> <objective> matches 1000..9999 run tellraw <selector> [{"text":"00"},{"score":"<selector>","objective":"<objective>"}]
/execute if score <selector> <objective> matches 10000..99999 run tellraw <selector> [{"text":"0"},{"score":"<selector>","objective":"<objective>"}]

...and so on. There just is no proper String handling in Minecraft, you can't crop Strings, search in them, etc., concatenation is pretty much the only standard String actions that works.

1.13 improved number handling a lot, let's hope that one of the next versions does the same for Strings!