Sdílet prostřednictvím


Character.ToUpperCase Method

Definition

Overloads

ToUpperCase(Int32)

Converts the character (Unicode code point) argument to uppercase using case mapping information from the UnicodeData file.

ToUpperCase(Char)

Converts the character argument to uppercase using case mapping information from the UnicodeData file.

ToUpperCase(Int32)

Converts the character (Unicode code point) argument to uppercase using case mapping information from the UnicodeData file.

[Android.Runtime.Register("toUpperCase", "(I)I", "")]
public static int ToUpperCase (int codePoint);
[<Android.Runtime.Register("toUpperCase", "(I)I", "")>]
static member ToUpperCase : int -> int

Parameters

codePoint
Int32

the character (Unicode code point) to be converted.

Returns

the uppercase equivalent of the character, if any; otherwise, the character itself.

Attributes

Remarks

Converts the character (Unicode code point) argument to uppercase using case mapping information from the UnicodeData file.

Note that Character.isUpperCase(Character.toUpperCase(codePoint)) does not always return true for some ranges of characters, particularly those that are symbols or ideographs.

In general, String#toUpperCase() should be used to map characters to uppercase. String case mapping methods have several benefits over Character case mapping methods. String case mapping methods can perform locale-sensitive mappings, context-sensitive mappings, and 1:M character mappings, whereas the Character case mapping methods cannot.

Added in 1.5.

Java documentation for java.lang.Character.toUpperCase(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

ToUpperCase(Char)

Converts the character argument to uppercase using case mapping information from the UnicodeData file.

[Android.Runtime.Register("toUpperCase", "(C)C", "")]
public static char ToUpperCase (char ch);
[<Android.Runtime.Register("toUpperCase", "(C)C", "")>]
static member ToUpperCase : char -> char

Parameters

ch
Char

the character to be converted.

Returns

the uppercase equivalent of the character, if any; otherwise, the character itself.

Attributes

Remarks

Converts the character argument to uppercase using case mapping information from the UnicodeData file.

Note that Character.isUpperCase(Character.toUpperCase(ch)) does not always return true for some ranges of characters, particularly those that are symbols or ideographs.

In general, String#toUpperCase() should be used to map characters to uppercase. String case mapping methods have several benefits over Character case mapping methods. String case mapping methods can perform locale-sensitive mappings, context-sensitive mappings, and 1:M character mappings, whereas the Character case mapping methods cannot.

<b>Note:</b> This method cannot handle supplementary characters. To support all Unicode characters, including supplementary characters, use the #toUpperCase(int) method.

Java documentation for java.lang.Character.toUpperCase(char).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to