Differences From Artifact [894fde2106]:
- File
tests/OFString/OFString.m
— part of check-in
[033054ad75]
at
2009-05-29 19:21:57
on branch trunk
— A few renames.
OFExceptions:
* OFNoMemException to OFOutOfMemoryException.
* OFMemNotPartOfObjException to OFMemoryNotPartOfObjectException.OFObject:
* -[addItemToMemoryPool:] to -[addMemoryToPool:].
* -[allocWithSize:] to -[allocMemoryWithSize:].
* -[allocNItems:withSize] to -[allocMemoryForNItems:withSize:].
* -[resizeMem:toSize] to -[resizeMemory:toSize:].
* -[resizeMem:toNItems:withSize:] to
-[resizeMemoryToNItems:withSize:].
* -[freeMem] to -[freeMemory:].OFString:
* -[urlencode] to -[urlEncodedString].
* -[urldecode] to -[urlDecodedString]. (user: js, size: 3512) [annotate] [blame] [check-ins using]
To Artifact [8579a7043b]:
- File tests/OFString/OFString.m — part of check-in [2496d46c35] at 2009-06-03 03:54:20 on branch trunk — Add methods to remove leading or trailing whitespaces or both. (user: js, size: 4068) [annotate] [blame] [check-ins using]
︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | - + | #ifndef _WIN32 #define ZD "%zd" #else #define ZD "%u" #endif |
︙ | |||
120 121 122 123 124 125 126 127 128 129 130 | 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 | + + + + + + + + + + + + + + | withString: @"foo"]; CHECK([s1 isEqual: @"asd foo asd foofoo asd"]) s1 = [@"XX" mutableCopy]; [s1 replaceOccurrencesOfString: @"X" withString: @"XX"]; CHECK([s1 isEqual: @"XXXX"]) s1 = [@" \t\t \tasd \t \t\t" mutableCopy]; s2 = [s1 mutableCopy]; s3 = [s1 mutableCopy]; CHECK([[s1 removeLeadingWhitespaces] isEqual: @"asd \t \t\t"]) CHECK([[s2 removeTrailingWhitespaces] isEqual: @" \t\t \tasd"]) CHECK([[s3 removeLeadingAndTrailingWhitespaces] isEqual: @"asd"]) s1 = [@" \t\t \t\t \t \t" mutableCopy]; s2 = [s1 mutableCopy]; s3 = [s1 mutableCopy]; CHECK([[s1 removeLeadingWhitespaces] isEqual: @""]) CHECK([[s2 removeTrailingWhitespaces] isEqual: @""]) CHECK([[s3 removeLeadingAndTrailingWhitespaces] isEqual: @""]) puts(""); return 0; } |