Hi Ken,

I did a quick look ( have several errands and a ball game to attend today ) but not much time. There were a few typos but other items. See comments below.


ucaseRef     = fn CFStringCreateWithPascalString( _kCFAllocatorDefault, upperCaseStr1, _kCFStringEncodingMacRoman )
mixedCaseRef = fn CFStringCreateWithPascalString( _kCFAllocatorDefault, mixedCaseStr2, _kCFStringEncodingMacRoman )
Since pointers to pascal strings are passed in these would have to dereference the string pointers:

ucaseRef     = fn CFStringCreateWithPascalString( _kCFAllocatorDefault, upperCaseStr1.nil$, _kCFStringEncodingMacRoman )
mixedCaseRef = fn CFStringCreateWithPascalString( _kCFAllocatorDefault, mixedCaseStr2.nil$, _kCFStringEncodingMacRoman )


Note: RP's original code here may work with char1 and char2...
if ( char2 >= _"a" ) then char2 -= _" " // lower case --> upper case

UniChar characters are simply ascii for characters below 128, so that nifty subtraction trick to convert lower/upper case CAN be used to compare chars from CFStringGetCharacterAtIndex(). This means CFStringCompare() should be unnecessary. This is all good because that upper/lower case conversion is fast.

Thanks again for the input Ken. Will work up a demo on Monday or later today when things slow down a little.


Brian





--
To unsubscribe, send ANY message to: futurebasic-unsubscribe@... To access the list archives, go to: http://freegroups.net/groups/futurebasic/