Loop Through the X++ for loop code and Assign Alphabets one by one to another string

 Hi,


Loop Through the X++ for loop code and Assign Alphabets one by one to another string


 For (int lineCount=0; lineCount<=26; lineCount++)

        {

 

            str strTCN ='HARE-KRISHNA-777XXX';

            str strTCNConcate =strTCN;


            //remove last 3 characters of a string.

            strTCNConcate= strDel(strTCN, strLen(strTCN) -2, 3);


            str strAplhapets ="ABCDEFGHIJKLMNOPQRSTUVWXYZ";


            str strFetchAplhapet= subStr(strAplhapets,lineCount,1);


            strTCNConcate=strTCNConcate + "X"+strFetchAplhapet+"X";


            info(strTCNConcate );


            

        }

OUTPUT



https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-ref/xpp-string-run-time-functions#substr


Comments