Enter the key words to find the related topics

Showing posts with label split the string length with limited. Show all posts
Showing posts with label split the string length with limited. Show all posts

Split the string length with limit

 To split the string length with limited 


CustTable   custTable;

    str         fullInvoiceNum, requiredTextInvoice, splitInvoice ,Invoice, staticText ="Payment of Invoice";

    int         i=1,j=1;

    while select custTable

    {

       fullInvoiceNum +=  custTable.name();

    }


    requiredTextInvoice = staticText + fullInvoiceNum;


    while (j < strLen(requiredTextInvoice))

    {


        if(i==1)

        {

           splitInvoice = subStr(requiredTextInvoice,j,35);

           Invoice = splitInvoice;

            j = 3;

        }

        else

        {

            splitInvoice = subStr(requiredTextInvoice,j,33);

            Invoice = " _" + splitInvoice;

        }


        j = j + 33;

        info(strFmt("%1  %2", Invoice, strLen(Invoice) ));

        i++;

    }