#include <CarbonCore/CarbonCore.h>

//work



/*EqualString

Compares two Pascal strings for equality, using the comparison rules of the Macintosh file system. (Deprecated in Mac OS X v10.4. Use CFStringCompare instead.)

Boolean EqualString (
   ConstStr255Param str1,
   ConstStr255Param str2,
   Boolean caseSensitive,
   Boolean diacSensitive
);
Parameters
str1

One of the Pascal strings to be compared. 
str2

The other Pascal string to be compared.
caseSensitive

A flag that indicates how to handle case-sensitive information during the comparison. If the value of caseSens is TRUE, uppercase characters are distinguished from the corresponding lowercase characters. If it is FALSE, case information is ignored. 
diacSensitive

A flag that indicates how to handle information about diacritical marks during the string comparison. If the value of diacSens is TRUE, characters with diacritical marks are distinguished from the corresponding characters without diacritical marks during the comparison. If it is FALSE, diacritical marks are ignored.
Return Value

TRUE if the two strings are equal and FALSE if they are not equal. If its value is TRUE, EqualString distinguishes uppercase characters from the corresponding lowercase characters. If its value is FALSE, EqualString ignores diacritical marks during the comparison. 
Discussion

The comparison is a simple, character-by-character value comparison. This function does not make use of any script or language information (i.e., is not localizable); it assumes the use of a Roman script system. 
Availability
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Declared In
StringCompare.h*/

Boolean EqualString (
   ConstStr255Param str1,
   ConstStr255Param str2,
   Boolean caseSensitive,
   Boolean diacSensitive
){};

/*RelString

Compares two Pascal strings using the string comparison rules of the Macintosh file system and returns a value that indicates the sorting order of the first string relative to the second string. (Deprecated in Mac OS X v10.4. Use CFStringCompare or UCCompareText instead.)

short RelString (
   ConstStr255Param str1,
   ConstStr255Param str2,
   Boolean caseSensitive,
   Boolean diacSensitive
);
Parameters
str1

One of the Pascal strings to be compared. 
str2

The other Pascal string to be compared.
caseSensitive

A flag that indicates how to handle case-sensitive information during the comparison. If the value of caseSens is TRUE, uppercase characters are distinguished from the corresponding lowercase characters. If it is FALSE, case information is ignored. 
diacSensitive

A flag that indicates how to handle information about diacritical marks during the string comparison. If the value of diacSensitive is TRUE, characters with diacritical marks are distinguished from the corresponding characters without diacritical marks during the comparison. If it is FALSE, diacritical marks are ignored.
Return Value

Returns –1 if the first string is less than the second string, 0 if the two strings are equal, and 1 if the first string is greater than the second string. It compares the two strings in the same manner as does the EqualString function, by simply looking at the ASCII values of their characters. However, RelString provides more information about the two strings—it indicates their relationship to each other, rather than determining if they are exactly equal. 
Discussion

This function does not make use of any script or language information; it assumes the original Macintosh character set only. 
Special Considerations

The RelString function is not localizable and does not work properly with non-Roman script systems.
Availability
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Declared In
StringCompare.h*/
short RelString (
   ConstStr255Param str1,
   ConstStr255Param str2,
   Boolean caseSensitive,
   Boolean diacSensitive
){};

/*CompareString

Compares two Pascal strings, making use of the string comparison information from a resource that you specify as a parameter. (Deprecated. Use CFStringCompare or UCCompareText instead.)

short CompareString (
   ConstStr255Param aStr,
   ConstStr255Param bStr,
   Handle itl2Handle
);
Parameters
aStr

One of the Pascal strings to be compared. 
bStr

The other Pascal string to be compared.
itl2Handle

The handle to the string-manipulation resource that contains string comparison information. If the value of this parameter is NULL, CompareString makes use of the resource for the current script. The string-manipulation resource includes functions and tables for modifying string comparison and tables for case conversion and stripping of diacritical marks. 
Return Value

Returns –1 if the first string is less than the second string, 0 if the first string is equal to the second string, and 1 if the first string is greater than the second string. 
Discussion

This function takes both primary and secondary sorting orders into consideration and returns a value that indicates the sorting order of the first string relative to the second string. 
Special Considerations

CompareString may move memory; your application should not call this function at interrupt time.
Declared In
StringCompare.h*/
short CompareString (
   ConstStr255Param aStr,
   ConstStr255Param bStr,
   Handle itl2Handle
){};

/*IdenticalText

Compares two text strings for equality, making use of the string comparison information from a resource that you specify as a parameter. (Deprecated in Mac OS X v10.4. Use CFStringCompare instead.)

short IdenticalText (
   const void * aPtr,
   const void * bPtr,
   short aLen,
   short bLen,
   Handle itl2Handle
);

Parameters
aPtr

A pointer to the first character of the first text string. 
bPtr

A pointer to the first character of the second text string.
aLen

The length, in bytes, of the first text string. 
bLen

The length, in bytes, of the second text string.
itl2Handle

A handle to a string-manipulation ('itl2') resource that contains string comparison information.

The itl2Handle parameter is used to specify a string-manipulation resource. If the value of this parameter is NULL, IdenticalText makes use of the resource for the current script. The string-manipulation resource includes functions and tables for modifying string comparison and tables for case conversion and stripping of diacritical marks.

Return Value

0 if the two text strings are equal; 1 if they are not equal. It compares the strings without regard for secondary sorting order, which means that it ignores diacritical marks and does not distinguish between lowercase and uppercase. For example, if the two text strings are 'Rose' and 'rosé', IdenticalText considers them equal and returns 0. 
Discussion

IdenticalText uses only primary sorting order in its comparison. 
Special Considerations

IdenticalText may move memory; your application should not call this function at interrupt time.
Availability
Available in Mac OS X v10.0 and later.
Deprecated in Mac OS X v10.4.
Declared In
StringCompare.h*/

short IdenticalText (
   const void * aPtr,
   const void * bPtr,
   short aLen,
   short bLen,
   Handle itl2Handle
){};

