revert between 56095 -> 55830 in arch
[AROS.git] / rom / utility / toupper.c
blob0053fd28c346f51c8978fd2280c57aadcbcaf7d0
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <exec/types.h>
9 #include <aros/libcall.h>
10 #include "intern.h"
12 /*****************************************************************************
14 NAME */
15 #include <proto/utility.h>
17 AROS_LH1I(UBYTE, ToUpper,
19 /* SYNOPSIS */
20 AROS_LHA(ULONG, character, D0),
22 /* LOCATION */
23 struct UtilityBase *, UtilityBase, 29, Utility)
25 /* FUNCTION
26 Convert a character to uppercase
28 INPUTS
29 character - The character that you want changed.
31 RESULT
32 The uppercase version of that character.
34 NOTES
35 Currently only works for ASCII characters. Would not be difficult
36 to adapt for other character sets (Unicode for example).
38 This function is patched by the locale.library, so you should be
39 prepared for different results when running under different
40 languages.
42 EXAMPLE
43 STRPTR string; UBYTE chr;
45 \* Convert a string to uppercase *\
46 while( chr = *string )
48 *string = ToUpper( chr );
49 string++;
52 BUGS
54 SEE ALSO
55 ToLower()
57 INTERNALS
58 This function is patched by locale.library.
60 HISTORY
61 29-10-95 digulla automatically created from
62 utility_lib.fd and clib/utility_protos.h
63 10-08-96 iaint Created from tolower.c from AROSdev15
64 *****************************************************************************/
66 AROS_LIBFUNC_INIT
68 return
70 (character >= 'a' && character <= 'z')
71 || (character >= 0xE0
72 && character <= 0xEE
73 && character != 0xE7)
74 ? character - 0x20
75 : character
78 AROS_LIBFUNC_EXIT
79 } /* ToLower */