mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Added patch from nicola
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8318 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
29d2f5690b
commit
38e2332a79
3 changed files with 39 additions and 20 deletions
|
@ -40,22 +40,6 @@ setupCache()
|
|||
}
|
||||
}
|
||||
|
||||
NSRange
|
||||
NSMakeRange(unsigned int location, unsigned int length)
|
||||
{
|
||||
NSRange range;
|
||||
unsigned int end = location + length;
|
||||
|
||||
if (end < location || end < length)
|
||||
{
|
||||
[NSException raise: NSRangeException
|
||||
format: @"Range location + length too great"];
|
||||
}
|
||||
range.location = location;
|
||||
range.length = length;
|
||||
return range;
|
||||
}
|
||||
|
||||
NSRange
|
||||
NSRangeFromString(NSString* string)
|
||||
{
|
||||
|
@ -86,3 +70,8 @@ NSStringFromRange(NSRange range)
|
|||
range.location, range.length];
|
||||
}
|
||||
|
||||
void _NSRangeExceptionRaise ()
|
||||
{
|
||||
[NSException raise: NSRangeException
|
||||
format: @"Range location + length too great"];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue