CharacterGroupings CharacterGroupings CharacterGroupings CharacterGroupings CharacterGroupings Class

Definition

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

public : sealed class CharacterGroupings : IIterable<CharacterGrouping>, IVectorView<CharacterGrouping>, ICharacterGroupings
struct winrt::Windows::Globalization::Collation::CharacterGroupings : IIterable<CharacterGrouping>, IVectorView<CharacterGrouping>, ICharacterGroupings
public sealed class CharacterGroupings : IEnumerable<CharacterGrouping>, IReadOnlyList<CharacterGrouping>, ICharacterGroupings
Public NotInheritable Class CharacterGroupings Implements IEnumerable<CharacterGrouping>, IReadOnlyList<CharacterGrouping>, ICharacterGroupings
var characterGroupings = new characterGroupings();
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

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;
}

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 with a CharacterGrouping constraint.

Constructors

CharacterGroupings() CharacterGroupings() CharacterGroupings() CharacterGroupings() CharacterGroupings()

Create a CharacterGroupings object for the default collation.

CharacterGroupings(String) CharacterGroupings(String) CharacterGroupings(String) CharacterGroupings(String) CharacterGroupings(String)

Create a CharacterGroupings object for the collation belonging to the given language.

Properties

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

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

Size Size Size Size Size

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

Methods

First() First() First() First() First()

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

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

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

GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

Returns an enumerator that iterates through the collection.

GetMany(UInt32, CharacterGrouping[]) GetMany(UInt32, CharacterGrouping[]) 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.

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

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

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

Gets the label under which the provided text falls.