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)

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

Constructors

CharacterGroupings() CharacterGroupings() CharacterGroupings()

Create a CharacterGroupings object for the default collation.

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

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

public : CharacterGroupings(PlatForm::String language)public CharacterGroupings(String language)Public Sub New(language As String)
Parameters
language
PlatForm::String String String
Attributes
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

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

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 : unsigned short Size { get; }This member is not implemented in C#This member is not implemented in VB.Net
Value
unsigned short 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(unsigned int index)This member is not implemented in C#This member is not implemented in VB.Net
Parameters
index
unsigned int UInt32 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

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

Attributes

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 : unsigned short GetMany(unsigned int startIndex, CharacterGrouping[] items)This member is not implemented in C#This member is not implemented in VB.Net
Parameters
startIndex
unsigned int UInt32 UInt32

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

items
CharacterGrouping[] CharacterGrouping[] CharacterGrouping[]

The CharacterGrouping objects in the set that start at startIndex.

Returns
unsigned short 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 : PlatForm::Boolean IndexOf(CharacterGrouping value, unsigned int index)This member is not implemented in C#This member is not implemented in VB.Net
Parameters
index
unsigned int UInt32 UInt32

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

Returns
PlatForm::Boolean 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 : PlatForm::String Lookup(PlatForm::String text)public string Lookup(String text)Public Function Lookup(text As String) As string
Parameters
text
PlatForm::String String String

The string for which to get the label.

Returns
PlatForm::String string string

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

Attributes