Left padding a String with Zeros [duplicate]

I’ve seen similar questions here and here.

But am not getting how to left pad a String with Zero.

input: “129018”
output: “0000129018”

The total output length should be TEN.

20 Answers
20

Leave a Comment