// Adding "-" between each four digit
static void RB_StringSplitFuntions1(Args _args)
{
str AccountCode = '1234567812312';
str inputCode,BankAccount;
int strlength,strsplitValue,i,j;
str output;
;
strlength = strLen(AccountCode);
strsplitValue = strLen(AccountCode) / 4;
for (i=0;i<=strsplitValue;i++)
{
BankAccount = subStr(AccountCode,j+1,4); j = j+4;
if (BankAccount)
inputCode += BankAccount +"-";
}
inputCode = substr(inputCode,1,strlen(inputCode)-1);
info(strfmt("%1",inputCode));
}
Tidak ada komentar:
Posting Komentar