Differences From Artifact [87572356ea]:
- File src/OFWideCString.m — part of check-in [cf85bee74f] at 2008-10-05 19:20:33 on branch trunk — Reworked String API. (user: js, size: 1291) [annotate] [blame] [check-ins using]
To Artifact [581afa2b30]:
- File
src/OFWideCString.m
— part of check-in
[b597d49f43]
at
2008-10-08 23:15:26
on branch trunk
— Multiple changes, see details.
* OFObject getMem: renamd to getMemWithSize:.
* OFString compare: renamed to compareTo:.
* Exceptions don't throw itself anymore.
* Exceptions include an error string now.
* Exceptions now got raise and string.
* New methods for OFFile:
* changeModeOfFile:toMode:
* changeOwnerOfFile:toOwner:andGroup:
* delete:
* link:to:
* symlink:to:
* OFFile isEndOfFile renamd to atEndOfFile
* OFNotImplementedExeception newWithObject:andMethod renamed to
newWithObject:andSelector:.
* Tests updated accordingly.
* TODO list added. (user: js, size: 1311) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
20 21 22 23 24 25 26 | { if ((self = [super init])) { if (str == NULL) { length = 0; string = NULL; } else { length = wcslen(str); | > | | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | { if ((self = [super init])) { if (str == NULL) { length = 0; string = NULL; } else { length = wcslen(str); string = [self getMemWithSize: (length + 1) * sizeof(wchar_t)]; wmemcpy(string, str, length + 1); } } return self; } - (wchar_t*)wcString { return string; } - (OFString*)clone { return [OFString newWithWideCString: string]; } - (int)compareTo: (OFString*)str { return wcscmp(string, [str wcString]); } - (OFString*)append: (OFString*)str { wchar_t *newstr; |
︙ | ︙ |