Hi Thomas,

Here is a C function to change the case of a text.

void            myLowercaseText(
        char    *text)
{
        CFStringRef     theString;
        
theString = CFStringCreateWithCString (kCFAllocatorDefault,text,kCFStringEncodingMacRoman);
        if( theString ) {
                CFStringLowercase((CFMutableStringRef)theString,NULL);
CFStringGetCString(theString,text,strlen(text) +1,kCFStringEncodingMacRoman);
                CFRelease(theString);
        }

        return;
}

Hope it helps
Thierry

On 2007, Mar 12, at 08:24, Thomas Fischer wrote:

Hello,

while compiling one external using Mac OS 10.4.8, XCode 2.4.1 and the "ExternalsEnvironmentV2" provided by the newsletter
I obtained the error:
 error: `strcasestr' undeclared (first use this function)
Can anybody explain this? strstr works without a problem, and the external compiles in an older setting of of the XCode environment too.

From a related problem an additional question:
LowercaseText has been deprecated, but the Unicode-savvy alternative CFStringLowercase with a CFMutableString seems pretty complicated. Does anybody know a simple method to make parameters like "AND" or "even" case-insensitive in an external functions?

Best regards
Thomas Fischer


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to