API  0.9.6
 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 splitRangeEntry
 

Variable Documentation

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

Definition at line 821 of file CPAttributedString.j.

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

Definition at line 805 of file CPAttributedString.j.

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

Definition at line 816 of file CPAttributedString.j.

var splitRangeEntry
Initial value:
= function splitRangeEntryAtIndex(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 826 of file CPAttributedString.j.