Differences From Artifact [39f7445e2b]:
- File
src/OFWideCString.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: 1504) [annotate] [blame] [check-ins using]
To Artifact [0d25058214]:
- File src/OFWideCString.m — part of check-in [62abf39400] at 2008-10-25 22:25:50 on branch trunk — newWithFooString -> newAsFooString. (user: js, size: 1500) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
43 44 45 46 47 48 49 | - (size_t)length { return length; } - (OFString*)clone { | | | | 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 75 76 77 | - (size_t)length { return length; } - (OFString*)clone { return [OFString newAsWideCString: string]; } - (int)compareTo: (OFString*)str { return wcscmp(string, [str wcString]); } - (OFString*)append: (OFString*)str { return [self appendWideCString: [str wcString]]; } - (OFString*)appendWideCString: (const wchar_t*)str { wchar_t *newstr; size_t newlen, strlength; if (string == NULL) return [self setTo: [OFString newAsWideCString: (wchar_t*)str]]; strlength = wcslen(str); newlen = length + strlength; newstr = [self resizeMem: string toSize: (newlen + 1) * sizeof(wchar_t)]; |
︙ | ︙ |