Hi all,
I was looking for a method like: "str2map". But there is no such
method available in Axapta. The only alternative to assign
a "key=value" pair to a map object is to itterate through the string
yourself. Because I always forget this, I post this information
here. If someone has a better sollution, please tell me so.
Thanks,
str s = "key1=value1, key2=value2, key3=value3, key4=value4,
key5=value5";
Container c;
str keypair, key, value;
int i, ipos;
;
c = str2con(s);
for (i=1; i < conlen(c)+1 ; i++)
{
keypair = strRTrim(strLTrim(ConPeek( c, i )));
ipos = strScan(keypair, "=", 1, strLen(keypair));
key = substr(keypair, 1, ipos-1);
value = substr(keypair, ipos+1, strLen(keypair));
info(strFmt("Key: %1, Value: %2", key, value));
}
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

