Important: The information in this document is obsolete and should not be used for new development.
UppercaseStripDiacritics
TheUppercaseStripDiacriticsprocedure converts any lowercase characters in a text string into their uppercase equivalents and strips any diacritical marks from the text. The text string can be up to 32 KB in length.
PROCEDURE UppercaseStripDiacritics (textPtr: Ptr; len: Integer; script: ScriptCode);
textPtr- A pointer to the text string to be converted.
len- The number of bytes in the text string.
script- The script code of the script system whose resources are used to determine the results of converting characters.
DESCRIPTION
UppercaseStripDiacriticstraverses the characters starting at the address specified bytextPtrand continues for the number of characters specified inlen. It converts lowercase characters in the text into their uppercase equivalents and also strips diacritical marks from the text string. This procedure combines the effects of theUppercaseTextandStripDiacriticsprocedures.The conversion uses tables in the string-manipulation (
'itl2') resource of the script specified by the value of thescriptparameter. The possible values for script codes are listed in the chapter "Script Manager" of this book. You can specifysmSystemScriptto use the system script andsmCurrentScriptto use the script of the current font in the current graphics port.If
UppercaseStripDiacriticscannot access the specified resource, it generates an error code and does not modify the string. You need to call theResErrorfunction to determine which, if any, error occurred.ResErroris described in the Resource Manager chapter of the book Inside Macintosh: More Macintosh Toolbox.
SPECIAL CONSIDERATIONSUppercaseStripDiacriticsmay move memory; your application should not call this procedure at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro for theUppercaseStripDiacriticsprocedure is
Trap macro _StripUpperText The registers on entry and exit for this routine are
Registers on entry A0 pointer to first character of string D0 length of string in bytes (word); must be less than 32 KB
Registers on exit D0 result code RESULT CODES
noErr 0 No error resNotFound -192 Can't get correct 'itl2'resource or resource is not in current format