203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
size_t lenNew;
ssize_t lenOld;
if (_s->isUTF8)
idx = of_string_utf8_get_position(_s->cString, idx,
_s->cStringLength);
if (idx > _s->cStringLength)
@throw [OFOutOfRangeException exception];
/* Shortcut if old and new character both are ASCII */
if (character < 0x80 && !(_s->cString[idx] & 0x80)) {
_s->hashed = false;
_s->cString[idx] = character;
return;
|
|
|
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
size_t lenNew;
ssize_t lenOld;
if (_s->isUTF8)
idx = of_string_utf8_get_position(_s->cString, idx,
_s->cStringLength);
if (idx >= _s->cStringLength)
@throw [OFOutOfRangeException exception];
/* Shortcut if old and new character both are ASCII */
if (character < 0x80 && !(_s->cString[idx] & 0x80)) {
_s->hashed = false;
_s->cString[idx] = character;
return;
|