Platforms to show: All Mac Windows Linux Cross-Platform

StringToStringHashMapMBS.AddKeys(targetArray() as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 12.5 Yes Yes Yes Yes No
Function: Similar to keys, but adds keys to the given array.
Notes: For older Xojo version 2007/2008 where the plugin can't create an array, so the values and keys function returns always nil.

Feedback, Comments & Corrections

StringToStringHashMapMBS.AddValues(targetArray() as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 12.5 Yes Yes Yes Yes No
Function: Similar to values, but adds values to the given array.
Notes: For older Xojo version 2007/2008 where the plugin can't create an array, so the values and keys function returns always nil.

Feedback, Comments & Corrections

StringToStringHashMapMBS.Clear
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 8.2 Yes Yes Yes Yes No
Function: Erases all of the elements.

Feedback, Comments & Corrections

StringToStringHashMapMBS.Clone as StringToStringHashMapMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 12.3 Yes Yes Yes Yes No
Function: Creates a copy of this map.

Feedback, Comments & Corrections

StringToStringHashMapMBS.CloneDictionary as Dictionary
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 12.3 Yes Yes Yes Yes No
Function: Creates a copy of this map as a dictionary.
Example:
dim d as new Dictionary
d.Value("Hello") = "World"

// convert o map
dim m as new StringToStringHashMapMBS(d)
MsgBox str(m.Count)

// convert back
dim o as Dictionary = m.CloneDictionary
MsgBox o.Value("Hello")

Feedback, Comments & Corrections

StringToStringHashMapMBS.Constructor(CaseSensitive as Boolean = true)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 8.2 Yes Yes Yes Yes No
Function: The default constructor.
Notes: If CaseSensitive is true, the comparison of texts or strings is case sensitive.

See also:

Feedback, Comments & Corrections

StringToStringHashMapMBS.Constructor(dic as dictionary, CaseSensitive as Boolean = true)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 12.3 Yes Yes Yes Yes No
Function: Creates a new map with the keys and values from the dictionary.
Example:
dim d as new Dictionary
d.Value("Hello") = "World"

// convert o map
dim m as new StringToStringHashMapMBS(d)
MsgBox str(m.Count)

// convert back
dim o as Dictionary = m.CloneDictionary
MsgBox o.Value("Hello")

See also:

Feedback, Comments & Corrections

StringToStringHashMapMBS.Constructor(other as StringToStringHashMapMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 12.3 Yes Yes Yes Yes No
Function: Creates a new map with the keys and values from the existing map.
Example:
dim d as new Dictionary
d.Value("Hello") = "World"

// convert o map
dim m as new StringToStringHashMapMBS(d)
MsgBox str(m.Count)

// convert back
dim o as StringToStringHashMapMBS = m.Clone
MsgBox o.Value("Hello")

See also:

Feedback, Comments & Corrections

StringToStringHashMapMBS.CountKey(key as string) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 8.2 Yes Yes Yes Yes No
Function: Counts how often a key is used in this map.

Feedback, Comments & Corrections

StringToStringHashMapMBS.find(key as string) as StringToStringHashMapIteratorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 8.2 Yes Yes Yes Yes No
Function: Finds the key and returns an interator.
Notes: Returns the same value as the last method if the item was not found.

Feedback, Comments & Corrections

StringToStringHashMapMBS.first as StringToStringHashMapIteratorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 8.2 Yes Yes Yes Yes No
Function: Returns an iterator pointing to the beginning of the map.
Example:
// Create a map
dim m as new StringToStringHashMapMBS

m.value("1")="Hello"
m.value("2")="World"
m.value("3")="!"

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

// Show all keys and values
while i.isNotEqual(e)
MsgBox str(i.Key)+" -> "+i.Value
i.MoveNext
wend

Feedback, Comments & Corrections

StringToStringHashMapMBS.hasKey(key as string) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 8.2 Yes Yes Yes Yes No
Function: Returns True if Key is in the map and False if it is not. Returns a Boolean.

Feedback, Comments & Corrections

StringToStringHashMapMBS.Key(index as Integer) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 8.2 Yes Yes Yes Yes No
Function: Returns the value of key for the Indexth sequential item.
Notes: If there is no Indexth item in the map, a call generates an OutOfBoundsException error. The first item has the index zero.

Feedback, Comments & Corrections

StringToStringHashMapMBS.Keys as string()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 8.2 Yes Yes Yes Yes No
Function: Returns all the keys as an array.
Example:
dim m as new StringToStringHashMapMBS

m.Value("1")="Hello"
m.Value("2")="World"

for each v as string in m.Keys
MsgBox str(v)
next
Notes: 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.

Feedback, Comments & Corrections

StringToStringHashMapMBS.last as StringToStringHashMapIteratorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 8.2 Yes Yes Yes Yes No
Function: Returns an iterator pointing to the end of the map.
Example:
// Create a map
dim m as new StringToStringHashMapMBS

m.value("1")="Hello"
m.value("2")="World"
m.value("3")="!"

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

// Show all keys and values
while i.isNotEqual(e)
MsgBox str(i.Key)+" -> "+i.Value
i.MoveNext
wend

Feedback, Comments & Corrections

StringToStringHashMapMBS.lookup(key as string, defaultvalue as string) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 8.2 Yes Yes Yes Yes No
Function: Looks up the passed value of Key.
Example:
dim map as new StringToStringHashMapMBS

map.value("a")="Hello"
map.value("b")="World"
map.value("c")="!"

MsgBox str(map.lookup("d","?")) // shows "?" as value is missing
MsgBox str(map.lookup("a","?")) // shows "Hello" as value is found
Notes: If Key is found, it returns the corresponding value. If Key is not found, it returns the passed defaultValue.

Feedback, Comments & Corrections

StringToStringHashMapMBS.Operator_Convert as Dictionary
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 12.3 Yes Yes Yes Yes No
Function: Creates a copy of the map as dictionary.
Example:
dim d as new Dictionary
d.Value("Hello") = "World"

// convert o map
dim m as StringToStringHashMapMBS = d
MsgBox str(m.Count)

// convert back
dim o as Dictionary = m
MsgBox o.Value("Hello")

Feedback, Comments & Corrections

StringToStringHashMapMBS.Remove(first as StringToStringHashMapIteratorMBS, last as StringToStringHashMapIteratorMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 8.2 Yes Yes Yes Yes No
Function: Erases all elements in a range.

See also:

Feedback, Comments & Corrections

StringToStringHashMapMBS.Remove(key as string) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 8.2 Yes Yes Yes Yes No
Function: Erases the element with the given key.

See also:

Feedback, Comments & Corrections

StringToStringHashMapMBS.Remove(pos as StringToStringHashMapIteratorMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 8.2 Yes Yes Yes Yes No
Function: Erases the element pointed to by the pos iterator.

See also:

Feedback, Comments & Corrections

StringToStringHashMapMBS.value(key as string) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Data Types MBS DataTypes Plugin 8.2 Yes Yes Yes Yes No
Function: The value associated with the given key.
Notes:
If you query for a key which does not exist, a KeyNotFoundException is raised.
(Read and Write computed property)

Feedback, Comments & Corrections

StringToStringHashMapMBS.ValueAtIndex(index as Integer) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 8.2 Yes Yes Yes Yes No
Function: Returns the value with the given index.
Notes: If there is no Indexth item in the map, a call generates an OutOfBoundsException error. The first item has the index zero.

Feedback, Comments & Corrections

StringToStringHashMapMBS.Values as string()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Data Types MBS DataTypes Plugin 8.2 Yes Yes Yes Yes No
Function: Returns all the values as an array
Example:
dim m as new StringToStringHashMapMBS

m.Value("1")="Hello"
m.Value("2")="World"

for each v as string in m.Values
MsgBox str(v)
next
Notes: The order is stable and matches the order returned by Keys at least until the Map is modified. Use this method with For Each to loop through all the values.

Feedback, Comments & Corrections

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

The biggest plugin in space...




Links
MBS Xojo PDF Plugins