Important: The information in this document is obsolete and should not be used for new development.
UpperString
TheUpperString
procedure converts any lowercase letters in a Pascal string to their uppercase equivalents. This procedure converts characters using the Macintosh file system rules, which means that only a subset of the Roman character set (character codes with values through $D8) are converted. These rules are summarized in Table 5-2 on page 5-17. Use this procedure to emulate the behavior of the Macintosh file system.
PROCEDURE UpperString (VAR theString: Str255; diacSens: Boolean);
theString
- On input, this is the Pascal string to be converted. On output, this contains the string resulting from the conversion.
diacSens
- A flag that indicates whether the case conversion is to strip diacritical marks. If the value of this parameter is
FALSE
, diacritical marks
are stripped.DESCRIPTION
UpperString
traverses the characters intheString
and converts any lowercase characters with character codes in the range $0 through $D8 into their uppercase equivalents. If thediacSens
flag isTRUE
, diacritical marks are considered in the conversion; if it isFALSE
, any diacritical marks are stripped.UpperString
places the converted characters intheString
.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theUpperString
procedure are
Trap macro Selector _UprString $A054 The registers on entry and exit for this routine are
Registers on entry A0 pointer to first character of string D0 the length of the string (a word value)
Registers on exit A0 pointer to first character of string The trap macro for the
UpperString
procedure can take an optional argument, which changes the default setting used by the macro when it is called without arguments. This argument corresponds to the Boolean parameterdiacSens
that is used with the Pascal function call. The permutations of this trap macro are shown below; you must type each exactly as it is shown.The syntax shown here applies to the MPW Assembler; if you are using another development system, be sure to consult its documentation for the proper syntax.
Macro permutation Value of diacSens
_UprString TRUE _UprString ,MARKS FALSE