ICharSequence.CharAt(Int32) Method

Definition

Returns the char value at the specified index.

[Android.Runtime.Register("charAt", "(I)C", "GetCharAt_IHandler:Java.Lang.ICharSequenceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public char CharAt (int index);
[<Android.Runtime.Register("charAt", "(I)C", "GetCharAt_IHandler:Java.Lang.ICharSequenceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member CharAt : int -> char

Parameters

index
Int32

the index of the char value to be returned

Returns

the specified char value

Attributes

Exceptions

if index or index >= length().

Remarks

Returns the char value at the specified index. An index ranges from zero to length() - 1. The first char value of the sequence is at index zero, the next at index one, and so on, as for array indexing.

If the char value specified by the index is a surrogate, the surrogate value is returned.

Java documentation for java.lang.CharSequence.charAt(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