Differences From Artifact [92741a24d4]:
- File src/OFCString.m — part of check-in [2690e9848f] at 2008-11-05 17:13:44 on branch trunk — Start documenting stuff. (user: js, size: 1357) [annotate] [blame] [check-ins using]
To Artifact [745d2596c4]:
- File src/OFCString.m — part of check-in [cebd6fbbfc] at 2008-11-19 18:27:59 on branch trunk — Implement reverse for OF(Wide)CString & rename wcString -> wCString. (user: js, size: 1551) [annotate] [blame] [check-ins using]
︙ | |||
72 73 74 75 76 77 78 79 80 81 82 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | + + + + + + + + + + + + + | newstr = [self resizeMem: string toSize: newlen + 1]; memcpy(newstr + length, str, strlength + 1); length = newlen; string = newstr; return self; } - reverse { size_t i, j, len = length / 2; for (i = 0, j = length - 1; i < len; i++, j--) { string[i] ^= string[j]; string[j] ^= string[i]; string[i] ^= string[j]; } return self; } @end |