News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Minor change to str.substr/str.a_substr

Started by Randall Hyde, February 08, 2008, 08:30:48 PM

Previous topic - Next topic

Randall Hyde

Hi All,

I've just made a minor change to the str.substr and str.a_substr functions. If the substring they produce is truncated because the sum of index+len (arguments to substr) is greater than the length of the string passed as an argument, the function will return with the carry flag clear. In all other (non-exception) cases, the carry flag comes back clear.

I've also modified the "returns" string to be "@c" for both of these functions. Note that str.a_substr previously has a "returns" value of "eax". This will break any code that used the "returns" value.  However, this is probably quite rare for this particular function. If there are a large number of complaints, I might consider switching the "returns" value for str.a_substr back to "eax".
hLater,
Randy Hyde


Randall Hyde

Quick note: the change with respect to the @c returns value applies to the str.first, str.last, and str.truncate string function families, too.
hLater,
Randy Hyde