API  0.9.7
 All Classes Files Functions Variables Macros Groups Pages
CPAttributedString.j File Reference

Go to the source code of this file.

Variables

var copyRangeEntry
 
var isEqual
 
var makeRangeEntry
 
var splitRangeEntryAtIndex
 

Variable Documentation

var copyRangeEntry
Initial value:
= function(aRangeEntry)
{
return makeRangeEntry(CPMakeRangeCopy(aRangeEntry.range), [aRangeEntry.attributes copy]);
}

Definition at line 846 of file CPAttributedString.j.

var isEqual
Initial value:
= function(a, b)
{
if (a === b)
return YES;
if ([a respondsToSelector:@selector(isEqual:)] && [a isEqual:b])
return YES;
return NO;
}

Definition at line 830 of file CPAttributedString.j.

var makeRangeEntry
Initial value:
= function(aRange, attributes)
{
return {range:aRange, attributes:[attributes copy]};
}

Definition at line 841 of file CPAttributedString.j.

var splitRangeEntryAtIndex
Initial value:
= function(aRangeEntry, anIndex)
{
var newRangeEntry = copyRangeEntry(aRangeEntry),
cachedIndex = CPMaxRange(aRangeEntry.range);
aRangeEntry.range.length = anIndex - aRangeEntry.range.location;
newRangeEntry.range.location = anIndex;
newRangeEntry.range.length = cachedIndex - anIndex;
newRangeEntry.attributes = [newRangeEntry.attributes copy];
return [aRangeEntry, newRangeEntry];
}

Definition at line 851 of file CPAttributedString.j.