fill str value according to description ?

Hi everyone ;

imagine that you have a str field ; it is 5 digit … you want to add zero " 0" to the left until 10 digit .

example : str text = “23033”;

desired str : text =“0000023033” ;

what will you do for that?

Thanks in advance…

Regards

the answer is strRfix . Global::strRfix can do that ;

static void Job48(Args _args)
{
int i = 23033;
str padded;
str finalResult;
;

padded = strRFix(int2str(i), 10, “0”);
finalResult = strFmt("%1", padded);
info(finalResult);

}

Regards