Differences From Artifact [a7724d0cb6]:
- File src/OFMutableString.m — part of check-in [beb9051a10] at 2013-01-11 12:13:38 on branch trunk — Add -[OFMutableString appendCharacters:length:]. (user: js, size: 12257) [annotate] [blame] [check-ins using]
To Artifact [086c316216]:
- File
src/OFMutableString.m
— part of check-in
[50916b8dbe]
at
2013-01-11 12:41:54
on branch trunk
— OFString: Improve API for characters / UTF-32.
With this change, there is a clear separation between characters and
UTF-32 strings now. Characters are just an array of characters in the
native endianess, with no BOM prepended. UTF-32 on the other hand may
have a BOM and can be swapped and is optionally zero-terminated.This also fixes a few missing UTF-16 init methods in OFMutableString. (user: js, size: 13084) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
87 88 89 90 91 92 93 | - initWithCharacters: (const of_unichar_t*)characters length: (size_t)length { return (id)[[OFMutableString_UTF8 alloc] initWithCharacters: characters length: length]; } | | < < | < < < > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | - initWithCharacters: (const of_unichar_t*)characters length: (size_t)length { return (id)[[OFMutableString_UTF8 alloc] initWithCharacters: characters length: length]; } - initWithUTF16String: (const uint16_t*)string { return (id)[[OFMutableString_UTF8 alloc] initWithUTF16String: string]; } - initWithUTF16String: (const uint16_t*)string length: (size_t)length { return (id)[[OFMutableString_UTF8 alloc] initWithUTF16String: string length: length]; } - initWithUTF16String: (const uint16_t*)string byteOrder: (of_byte_order_t)byteOrder { return (id)[[OFMutableString_UTF8 alloc] initWithUTF16String: string byteOrder: byteOrder]; } - initWithUTF16String: (const uint16_t*)string length: (size_t)length byteOrder: (of_byte_order_t)byteOrder { return (id)[[OFMutableString_UTF8 alloc] initWithUTF16String: string length: length byteOrder: byteOrder]; } - initWithUTF32String: (const uint32_t*)string { return (id)[[OFMutableString_UTF8 alloc] initWithUTF32String: string]; } - initWithUTF32String: (const uint32_t*)string length: (size_t)length { return (id)[[OFMutableString_UTF8 alloc] initWithUTF32String: string length: length]; } - initWithUTF32String: (const uint32_t*)string byteOrder: (of_byte_order_t)byteOrder { return (id)[[OFMutableString_UTF8 alloc] initWithUTF32String: string byteOrder: byteOrder]; } - initWithUTF32String: (const uint32_t*)string length: (size_t)length byteOrder: (of_byte_order_t)byteOrder { return (id)[[OFMutableString_UTF8 alloc] initWithUTF32String: string length: length byteOrder: byteOrder]; } - initWithFormat: (OFConstantString*)format, ... { id ret; va_list arguments; va_start(arguments, format); |
︙ | ︙ |