Udostępnij za pośrednictwem


Character.ForDigit(Int32, Int32) Method

Definition

Determines the character representation for a specific digit in the specified radix.

[Android.Runtime.Register("forDigit", "(II)C", "")]
public static char ForDigit (int digit, int radix);
[<Android.Runtime.Register("forDigit", "(II)C", "")>]
static member ForDigit : int * int -> char

Parameters

digit
Int32

the number to convert to a character.

radix
Int32

the radix.

Returns

the char representation of the specified digit in the specified radix.

Attributes

Remarks

Determines the character representation for a specific digit in the specified radix. If the value of radix is not a valid radix, or the value of digit is not a valid digit in the specified radix, the null character ('\u005Cu0000') is returned.

The radix argument is valid if it is greater than or equal to MIN_RADIX and less than or equal to MAX_RADIX. The digit argument is valid if 0 <= digit < radix.

If the digit is less than 10, then '0' + digit is returned. Otherwise, the value 'a' + digit - 10 is returned.

Java documentation for java.lang.Character.forDigit(int, 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