997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
|
- (OFString*)stringByAppendingString: (OFString*)str
{
OFMutableString *new;
new = [OFMutableString stringWithString: self];
[new appendString: str];
return new;
}
- (BOOL)hasPrefix: (OFString*)prefix
{
size_t len = [prefix cStringLength];
|
>
>
>
>
>
>
|
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
|
- (OFString*)stringByAppendingString: (OFString*)str
{
OFMutableString *new;
new = [OFMutableString stringWithString: self];
[new appendString: str];
/*
* Class swizzle the string to be immutable. We declared the return type
* to be OFString*, so it can't be modified anyway. But not swizzling it
* would create a real copy each time -[copy] is called.
*/
new->isa = [OFString class];
return new;
}
- (BOOL)hasPrefix: (OFString*)prefix
{
size_t len = [prefix cStringLength];
|
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
|
i += delim_len - 1;
last = i + 1;
}
[array addObject: [OFString stringWithCString: string + last]];
[pool release];
return array;
}
- (intmax_t)decimalValue
{
int i = 0;
intmax_t num = 0;
|
>
>
>
>
>
>
|
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
|
i += delim_len - 1;
last = i + 1;
}
[array addObject: [OFString stringWithCString: string + last]];
[pool release];
/*
* Class swizzle the array to be immutable. We declared the return type
* to be OFArray*, so it can't be modified anyway. But not swizzling it
* would create a real copy each time -[copy] is called.
*/
array->isa = [OFArray class];
return array;
}
- (intmax_t)decimalValue
{
int i = 0;
intmax_t num = 0;
|