Differences From Artifact [4b2268ed9f]:
- File
src/OFUTF8String.m
— part of check-in
[627511b032]
at
2020-11-14 12:23:55
on branch trunk
— Rename of_malloc and of_calloc
The new names should be more accurate. (user: js, size: 28421) [annotate] [blame] [check-ins using] [more...]
To Artifact [212afc270e]:
- File src/OFUTF8String.m — part of check-in [1b2efa1f5d] at 2020-12-22 20:09:40 on branch trunk — Correctly handle componentsSeparatedByString: @"" (user: js, size: 28591) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
1109 1110 1111 1112 1113 1114 1115 | } - (OFArray *)componentsSeparatedByString: (OFString *)delimiter options: (int)options { void *pool; OFMutableArray *array; | | | > > > > > > > > | 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 | } - (OFArray *)componentsSeparatedByString: (OFString *)delimiter options: (int)options { void *pool; OFMutableArray *array; const char *cString; size_t cStringLength; bool skipEmpty = (options & OF_STRING_SKIP_EMPTY); size_t last; OFString *component; if (delimiter == nil) @throw [OFInvalidArgumentException exception]; if (delimiter.length == 0) return [OFArray arrayWithObject: self]; array = [OFMutableArray array]; pool = objc_autoreleasePoolPush(); cString = delimiter.UTF8String; cStringLength = delimiter.UTF8StringLength; if (cStringLength > _s->cStringLength) { [array addObject: [[self copy] autorelease]]; objc_autoreleasePoolPop(pool); return array; } |
︙ | ︙ |