Scripting msc Github
String Hash Map
This is an implementation of string:string hashmaps in minr.
Example Code (copied from tests()
)
@using stringHashMap
@define SHashMap testMap = SHashMap()
@player "Setting Test Value"
@var testMap.set("Test Value", "Success!")
@player "Value at Test Value (e: 'Success!'):"
@player {{testMap.get("Test Value")}}
@player "Value at Bad Value (e: null):"
@player {{testMap.get("Bad Value")}}
@player "Value at Bad Value (tryGetDefault) (e: 'Not Found!'):"
@player {{testMap.tryGetDefault("Bad Value", "Not Found!")}}
Classes
Class | Description |
---|---|
SHashMap |
The string hash map object |
KeyValuePair |
A structure that holds associated keys and values |
Internal KVPArrayWrapper |
A structure that holds an array of KeyValuePair |
Functions
Variables
Variable | Description |
---|---|
Internal Int arraySize |
The size of the array used to store the values. Set to 997 as a constant |
Internal String alphabet |
List of all ascii characters, in order |