Friday 11 March 2016

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

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);

}

No comments:

Post a Comment