Platforms to show: All Mac Windows Linux Cross-Platform

Back to StringOrderedSetMBS class.

StringOrderedSetMBS.Clear

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Erases all of the elements.

StringOrderedSetMBS.Constructor(CaseSensitive as Boolean = true)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The default constructor.

If CaseSensitive is true, the comparison of texts or strings is case sensitive.

See also:

StringOrderedSetMBS.Constructor(Keys() as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new set from the values in the array.
Example
dim s() as string = array("Hello", "World", "test")

dim set as new StringOrderedSetMBS(s)

MsgBox str(set.Count)+" entries: "+Join(set.keys,", ")

If the array has duplicates, the later elements overwrite the earlier keys.

See also:

StringOrderedSetMBS.CountKey(key as string) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Counts how often a key is used in this set.

StringOrderedSetMBS.find(key as string) as StringOrderedSetIteratorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Finds the key and returns an interator.

Returns the same value as the last method if the item was not found.

StringOrderedSetMBS.first as StringOrderedSetIteratorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns an iterator pointing to the beginning of the set.
Example
// Create a map
dim m as new StringOrderedSetMBS

m.insert("1")
m.insert("2")
m.insert("3")

// get iterators pointing to first and after last element
dim i as StringOrderedSetIteratorMBS = m.first
dim e as StringOrderedSetIteratorMBS = m.last

// Show all keys and values
while i.isNotEqual(e)
MsgBox i.Key
i.MoveNext
wend

StringOrderedSetMBS.insert(key as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a value to the set.

StringOrderedSetMBS.Key(index as Integer) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the value of key for the Indexth sequential item.

If there is no Indexth item in the map, a call generates an OutOfBoundsException error. The first item has the index zero.

StringOrderedSetMBS.Keys as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns all the keys as an array.
Example
dim m as new StringOrderedSetMBS

m.insert("1")
m.insert("2")

for each v as string in m.Keys
MsgBox v
next

The order is stable and matches the order returned by the Values method at least until the Dictionary is modified. Use this method with For Each to loop through all the keys.

StringOrderedSetMBS.last as StringOrderedSetIteratorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns an iterator pointing to the end of the set.
Example
// Create a map
dim m as new StringOrderedSetMBS

m.insert("1")
m.insert("2")
m.insert("3")

// get iterators pointing to first and after last element
dim i as StringOrderedSetIteratorMBS = m.first
dim e as StringOrderedSetIteratorMBS = m.last

// Show all keys and values
while i.isNotEqual(e)
MsgBox i.Key
i.MoveNext
wend

StringOrderedSetMBS.lookup(key as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Checks whether an element with the given key exists in this set.
Example
dim set as new StringOrderedSetMBS

set.insert "Hello"
set.insert "World"

MsgBox str(set.lookup("missed")) // shows false as value is missing
MsgBox str(set.lookup("Hello")) // shows true as value is found

Returns true if yes and false if no.

StringOrderedSetMBS.LowerBound(key as string) as StringOrderedSetIteratorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns an iterator for the first element whose key is not less than k.

StringOrderedSetMBS.Remove(first as StringOrderedSetIteratorMBS, last as StringOrderedSetIteratorMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Erases all elements in a range.

See also:

StringOrderedSetMBS.Remove(key as string) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Erases the element with the given key.

See also:

StringOrderedSetMBS.Remove(pos as StringOrderedSetIteratorMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Erases the element pointed to by the pos iterator.

See also:

StringOrderedSetMBS.UpperBound(key as string) as StringOrderedSetIteratorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Data Types MBS DataTypes Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns an iterator for the first element whose key is greater than k.

The items on this page are in the following plugins: MBS DataTypes Plugin.


The biggest plugin in space...