Character​Groupings Character​Groupings Character​Groupings Class

Definition

Contains the set of character groups and the functionality to get the label for any given string.

public sealed class CharacterGroupings : IIterable, IVectorView, ICharacterGroupingspublic sealed class CharacterGroupings : IEnumerable, IReadOnlyList, ICharacterGroupingsPublic NotInheritable Class CharacterGroupings Implements IEnumerable, IReadOnlyList, ICharacterGroupings
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Collection member lists

For JavaScript, CharacterGroupings has the members shown in the member lists. In addition, CharacterGroupings supports a length property, members of Array.prototype, and using an index to access items.

Enumerating the collection in C# or Microsoft Visual Basic

CharacterGroupings is enumerable, so you can use language-specific syntax such as foreach in C# to enumerate the items in the collection. The compiler does the type-casting for you and you won't need to cast to IEnumerable<CharacterGrouping> explicitly. If you do need to cast explicitly, for example if you want to call GetEnumerator, cast to IEnumerable<T> with a CharacterGrouping constraint.

Examples

// Create a CharacterGroupings object for the default collation.
var characterGroupings = new Windows.Globalization.Collation.CharacterGroupings();
// Get the number of CharacterGrouping objects.
var size = characterGroupings.size;
if (size > 0) {
    // Get the first characterGrouping.
    var characterGrouping = characterGroupings.getAt(0);
    // Get the first item in this characterGrouping.
    var first = characterGrouping.first;
    // Get the label of the first item in this characterGrouping.
    var label = characterGrouping.label;
}

Constructors

CharacterGroupings() CharacterGroupings() CharacterGroupings()

Create a CharacterGroupings object for the default collation.

public CharacterGroupings()public CharacterGroupings()Public Sub New()
Attributes

Properties

Item[Int32] Item[Int32] Item[Int32]

Gets the element at the specified index in the read-only list.

This member is not implemented in C++T this[int index] { get; }ReadOnly Property Item(index As Integer) As T
Parameters
index
System.Int32 System.Int32 System.Int32

The zero-based index of the element to get.

Value
T T T

The element at the specified index in the read-only list.

Attributes

Size Size Size

Gets the number of CharacterGrouping objects in the set of character groups.

public uint Size { get; }This member is not implemented in C#This member is not implemented in VB.Net
Value
uint uint uint

The number of objects in the set.

Attributes

Methods

First() First() First()

Returns an iterator to enumerate the items in the set of character groups.

public IIterator<CharacterGrouping> First()This member is not implemented in C#This member is not implemented in VB.Net
Returns

The iterator. The current position of the iterator is index 0, or the end of the set of character groups if the set is empty.

Attributes

GetAt(UInt32) GetAt(UInt32) GetAt(UInt32)

Returns the CharacterGrouping at the specified index in the set of character groups.

public CharacterGrouping GetAt(UInt32 index)This member is not implemented in C#This member is not implemented in VB.Net
Parameters
index
System.UInt32 System.UInt32 System.UInt32

The zero-based index of the CharacterGrouping in the set to return.

Returns
Attributes

GetEnumerator() GetEnumerator() GetEnumerator()

Returns an enumerator that iterates through the collection.

This member is not implemented in C++IEnumerator<T> GetEnumerator()Function GetEnumerator As IEnumerator(Of T)
Returns
System.Collections.Generic.IEnumerator<T> System.Collections.Generic.IEnumerator<T> System.Collections.Generic.IEnumerator<T>

An enumerator that can be used to iterate through the collection.

Attributes
See Also
System.Collections.Generic.IEnumerator<T>System.Collections.Generic.IEnumerator<T>System.Collections.Generic.IEnumerator<T>

GetMany(UInt32, CharacterGrouping[]) GetMany(UInt32, CharacterGrouping[]) GetMany(UInt32, CharacterGrouping[])

Returns the CharacterGrouping objects that start at the specified index in the set of character groups.

public uint GetMany(UInt32 startIndex, CharacterGrouping[] items)This member is not implemented in C#This member is not implemented in VB.Net
Parameters
startIndex
System.UInt32 System.UInt32 System.UInt32

The zero-based index of the start of the CharacterGrouping objects in the set to return.

items
Windows.Globalization.Collation.CharacterGrouping[] Windows.Globalization.Collation.CharacterGrouping[] Windows.Globalization.Collation.CharacterGrouping[]

The CharacterGrouping objects in the set that start at startIndex.

Returns
uint uint uint

The number of objects returned.

Attributes

IndexOf(CharacterGrouping, UInt32) IndexOf(CharacterGrouping, UInt32) IndexOf(CharacterGrouping, UInt32)

Returns the index of a specified CharacterGrouping object in the set of character groups.

public bool IndexOf(CharacterGrouping value, UInt32 index)This member is not implemented in C#This member is not implemented in VB.Net
Parameters
index
System.UInt32 System.UInt32 System.UInt32

The zero-based index of the CharacterGrouping object, if found. The method returns zero if the object is not found.

Returns
bool bool bool

True if the object is found, otherwise false.

Attributes

Lookup(String) Lookup(String) Lookup(String)

Gets the label under which the provided text falls.

public string Lookup(String text)public string Lookup(String text)Public Function Lookup(text As String) As string
Parameters
text
System.String System.String System.String

The string for which to get the label.

Returns
string string string

The value, if an item with the specified key exists. Use the HasKey method to determine whether the key exists.

Attributes