Integer.ParseUnsignedInt Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ParseUnsignedInt(String, Int32) |
Parses the string argument as an unsigned integer in the radix specified by the second argument. |
ParseUnsignedInt(String, Int32, Int32, Int32) |
Parses the |
ParseUnsignedInt(ICharSequence, Int32, Int32, Int32) |
Parses the |
ParseUnsignedInt(String) |
Parses the string argument as an unsigned decimal integer. |
ParseUnsignedInt(String, Int32)
Parses the string argument as an unsigned integer in the radix specified by the second argument.
[Android.Runtime.Register("parseUnsignedInt", "(Ljava/lang/String;I)I", "", ApiSince=26)]
public static int ParseUnsignedInt (string s, int radix);
[<Android.Runtime.Register("parseUnsignedInt", "(Ljava/lang/String;I)I", "", ApiSince=26)>]
static member ParseUnsignedInt : string * int -> int
Parameters
- s
- String
the String
containing the unsigned integer
representation to be parsed
- radix
- Int32
the radix to be used while parsing s
.
Returns
the integer represented by the string argument in the specified radix.
- Attributes
Remarks
Parses the string argument as an unsigned integer in the radix specified by the second argument. An unsigned integer maps the values usually associated with negative numbers to positive numbers larger than MAX_VALUE
.
The characters in the string must all be digits of the specified radix (as determined by whether java.lang.Character#digit(char, int)
returns a nonnegative value), except that the first character may be an ASCII plus sign '+'
('\u005Cu002B'
). The resulting integer value is returned.
An exception of type NumberFormatException
is thrown if any of the following situations occurs: <ul> <li>The first argument is null
or is a string of length zero.
<li>The radix is either smaller than java.lang.Character#MIN_RADIX
or larger than java.lang.Character#MAX_RADIX
.
<li>Any character of the string is not a digit of the specified radix, except that the first character may be a plus sign '+'
('\u005Cu002B'
) provided that the string is longer than length 1.
<li>The value represented by the string is larger than the largest unsigned int
, 2<sup>32</sup>-1.
</ul>
Added in 1.8.
Java documentation for java.lang.Integer.parseUnsignedInt(java.lang.String, 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
ParseUnsignedInt(String, Int32, Int32, Int32)
Parses the CharSequence
argument as an unsigned int
in
the specified radix
, beginning at the specified
beginIndex
and extending to endIndex - 1
.
public static int ParseUnsignedInt (string s, int beginIndex, int endIndex, int radix);
static member ParseUnsignedInt : string * int * int * int -> int
Parameters
- s
- String
the CharSequence
containing the unsigned
int
representation to be parsed
- beginIndex
- Int32
the beginning index, inclusive.
- endIndex
- Int32
the ending index, exclusive.
- radix
- Int32
the radix to be used while parsing s
.
Returns
the unsigned int
represented by the subsequence in
the specified radix.
Remarks
Parses the CharSequence
argument as an unsigned int
in the specified radix
, beginning at the specified beginIndex
and extending to endIndex - 1
.
The method does not take steps to guard against the CharSequence
being mutated while parsing.
Added in 9.
Java documentation for java.lang.Integer.parseUnsignedInt(java.lang.CharSequence, int, 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
ParseUnsignedInt(ICharSequence, Int32, Int32, Int32)
Parses the CharSequence
argument as an unsigned int
in
the specified radix
, beginning at the specified
beginIndex
and extending to endIndex - 1
.
[Android.Runtime.Register("parseUnsignedInt", "(Ljava/lang/CharSequence;III)I", "", ApiSince=33)]
public static int ParseUnsignedInt (Java.Lang.ICharSequence s, int beginIndex, int endIndex, int radix);
[<Android.Runtime.Register("parseUnsignedInt", "(Ljava/lang/CharSequence;III)I", "", ApiSince=33)>]
static member ParseUnsignedInt : Java.Lang.ICharSequence * int * int * int -> int
Parameters
the CharSequence
containing the unsigned
int
representation to be parsed
- beginIndex
- Int32
the beginning index, inclusive.
- endIndex
- Int32
the ending index, exclusive.
- radix
- Int32
the radix to be used while parsing s
.
Returns
the unsigned int
represented by the subsequence in
the specified radix.
- Attributes
Remarks
Parses the CharSequence
argument as an unsigned int
in the specified radix
, beginning at the specified beginIndex
and extending to endIndex - 1
.
The method does not take steps to guard against the CharSequence
being mutated while parsing.
Added in 9.
Java documentation for java.lang.Integer.parseUnsignedInt(java.lang.CharSequence, int, 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
ParseUnsignedInt(String)
Parses the string argument as an unsigned decimal integer.
[Android.Runtime.Register("parseUnsignedInt", "(Ljava/lang/String;)I", "", ApiSince=26)]
public static int ParseUnsignedInt (string s);
[<Android.Runtime.Register("parseUnsignedInt", "(Ljava/lang/String;)I", "", ApiSince=26)>]
static member ParseUnsignedInt : string -> int
Parameters
- s
- String
a String
containing the unsigned int
representation to be parsed
Returns
the unsigned integer value represented by the argument in decimal.
- Attributes
Remarks
Parses the string argument as an unsigned decimal integer. The characters in the string must all be decimal digits, except that the first character may be an ASCII plus sign '+'
('\u005Cu002B'
). The resulting integer value is returned, exactly as if the argument and the radix 10 were given as arguments to the #parseUnsignedInt(java.lang.String, int)
method.
Added in 1.8.
Java documentation for java.lang.Integer.parseUnsignedInt(java.lang.String)
.
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.