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, IVectorView, ICharacterGroupingspublic sealed class CharacterGroupings : IEnumerable, IReadOnlyList, ICharacterGroupingsPublic NotInheritable Class CharacterGroupings Implements IEnumerable, IReadOnlyList, ICharacterGroupings// You can use this class in JavaScript.
- Attributes
| 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
Constructors
CharacterGroupings() CharacterGroupings() CharacterGroupings() CharacterGroupings()
Create a CharacterGroupings object for the default collation.
public : CharacterGroupings()public CharacterGroupings()Public Sub New()// You can use this method in JavaScript.
CharacterGroupings(String) CharacterGroupings(String) CharacterGroupings(String) CharacterGroupings(String)
Create a CharacterGroupings object for the collation belonging to the given language.
public : CharacterGroupings(PlatForm::String language)public CharacterGroupings(String language)Public Sub New(language As String)// You can use this method in JavaScript.
- language
- PlatForm::String String String String
| 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] 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 TT this[int index] { get; }
- index
The zero-based index of the element to get.
- Value
- T T T T
The element at the specified index in the read-only list.
Size Size Size Size
Gets the number of CharacterGrouping objects in the set of character groups.
public : unsigned int Size { get; }This member is not implemented in C#This member is not implemented in VB.Net// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The number of objects in the set.
Methods
First() 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// You can use this method in JavaScript.
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.
GetAt(UInt32) 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// You can use this method in JavaScript.
- index
- unsigned int UInt32 UInt32 UInt32
The zero-based index of the CharacterGrouping in the set to return.
The CharacterGrouping at the specified index.
GetEnumerator() 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)IEnumerator<T> GetEnumerator()
An enumerator that can be used to iterate through the collection.
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.
public : unsigned int GetMany(unsigned int startIndex, CharacterGrouping[] items)This member is not implemented in C#This member is not implemented in VB.Net// You can use this method in JavaScript.
- startIndex
- unsigned int UInt32 UInt32 UInt32
The zero-based index of the start of the CharacterGrouping objects in the set to return.
- items
- CharacterGrouping[] CharacterGrouping[] CharacterGrouping[] CharacterGrouping[]
The CharacterGrouping objects in the set that start at startIndex.
The number of objects returned.
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.
public : PlatForm::Boolean IndexOf(CharacterGrouping value, unsigned int index)This member is not implemented in C#This member is not implemented in VB.Net// You can use this method in JavaScript.
The CharacterGrouping object to find in the set.
- index
- unsigned int UInt32 UInt32 UInt32
The zero-based index of the CharacterGrouping object, if found. The method returns zero if the object is not found.
True if the object is found, otherwise false.
Lookup(String) 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// You can use this method in JavaScript.
- text
- PlatForm::String String String String
The string for which to get the label.
The value, if an item with the specified key exists. Use the HasKey method to determine whether the key exists.