Класс Global, Axapta 3.0
PHP код:
/* MAN
Modifies the value of a property in the supplied property set.
If the property does not exist the original property set is returned.
*/
static str setProperty(str properties, str propertyname, str value)
{
str s = properties;
int propertyPos = strScan(s, propertyName, 1, strLen(s));
int propertyLen = strScan(s, '\n', propertyPos, strLen(s));
if (!propertyPos)
return s;
propertyPos = strScan(s, '#', propertyPos, strLen(s))+1;
if (!propertyLen)
propertyLen = strlen(s);
s = strdel(s, propertyPos, propertyLen-propertyPos+1);
s = strIns(s, value+'\n', propertyPos);
return s;
}