Missing zeros while using function str2int()

HI,

In most cases, while we are converting str2int() we will be missing ‘0’s.

In my case, i have purchId(“00010”) which i need to insert into container but after insert we see its been changes to “10”, in these case we can use “strRFix()” function to get back original value.

sample code:
purchIdContainer = str2con(purchId);

//get length of the purch id and use the function strRFix()

purchIdStr = strRFix(conPeek(purchIdContainer,1),strlen(purchId),’0′);

Hope this help!!!.

Advertisements

One thought on “Missing zeros while using function str2int()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s