Lua API
On this page

GroupCollection

Inherits from

Tip

This is a builtin dotnet type. The documentation and api interface are generated from dotnet source files.

Returns the set of captured groups in a single match. The collection is immutable (read-only) and has no public constructor.

Fields:

Count number

read only

Returns the number of groups in the collection.

IsReadOnly boolean

read only

Gets a value that indicates whether the collection is read-only.

IsSynchronized boolean

read only

Gets a value that indicates whether access to the GroupCollection is synchronized (thread-safe).

Keys string[]

read only

Gets a string enumeration that contains the name keys of the group collection.

SyncRoot Object

read only

Gets an object that can be used to synchronize access to the GroupCollection.

Values Group[]

read only

Gets a group enumeration with all the groups in the group collection.

Methods:

ContainsKey(key: string) : boolean

Determines whether the group collection contains a captured group identified by the specified name.

Parameters:
NameTypeDefaultSummary
keystring

A string with the name of the captured group to locate.

Returns:boolean

CopyTo(array: Group, arrayIndex: number) : nil

Copies the elements of the group collection to a Group array, starting at a particular array index.

Parameters:
NameTypeDefaultSummary
arrayGroup

The one-dimensional array that is the destination of the elements copied from the group collection. The array must have zero-based indexing.

arrayIndexnumber

The zero-based index in array at which copying begins.

Returns:nil

GetPropertyKeys() : string[]

Returns a list of strings of all public property / field names. Useful for reflection on UserData in lua scripts

Returns:string[]

ToString() : string

Returns a string that represents the current object.

Returns:string

TryGetValue(key: string) : boolean, Group

Attempts to retrieve a group identified by the provided name key, if it exists in the group collection.

Parameters:
NameTypeDefaultSummary
keystring

A string with the group name key to look for.

Returns:
TypeSummary
boolean
Group

When the method returns, the group whose name is key, if it is found; otherwise, null if not found.