Differences From Artifact [dc3a9e9583]:
- File
src/OFCString.m
— part of check-in
[e47ad44290]
at
2008-10-22 13:32:19
on branch trunk
— Reworked OFObject and added append(Wide)CString to OFString.
The reworked OFObject lets one test fail on the GNU runtime.
Unfortunately, I have no idea why... (user: js, size: 1385) [annotate] [blame] [check-ins using]
To Artifact [cc01727386]:
- File src/OFCString.m — part of check-in [62abf39400] at 2008-10-25 22:25:50 on branch trunk — newWithFooString -> newAsFooString. (user: js, size: 1381) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
41 42 43 44 45 46 47 | - (size_t)length { return length; } - (OFString*)clone { | | | | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | - (size_t)length { return length; } - (OFString*)clone { return [OFString newAsCString: string]; } - (int)compareTo: (OFString*)str { return strcmp(string, [str cString]); } - (OFString*)append: (OFString*)str { return [self appendCString: [str cString]]; } - (OFString*)appendCString: (const char*)str { char *newstr; size_t newlen, strlength; if (string == NULL) return [self setTo: [OFString newAsCString: (char*)str]]; strlength = strlen(str); newlen = length + strlength; newstr = [self resizeMem: string toSize: newlen + 1]; |
︙ | ︙ |