Search This Blog

Wednesday, September 25, 2013

strLfix & strRfix Function - Append zeros to the String - AX 2009

Hi Folks,

The following code used to append zeros to the string either left /Right.

static void Append(Args _args)
{
    int i = 1;
    str Append;
    str finalResult;
    ;

   Append= strlFix(int2str(i), 5, "0"); // Create a string, with a length of 5, ending with the value of ''i'' and padded with zeros
finalResult = strFmt("%1", Append);
info(finalResult);

}

o/p:10000


Happy Daxing.....

No comments:

Post a Comment