Class ContentValues
VBScript Library: data\ContentValues.vbs

Wrapper around Scripting.Dictionary that allows key/value pairs to be spliced into an output string.

Reference

Method Detail

Return Type Method and Description
- add(byVal key, byVal value)
Adds a key and value to this ContentValues instance.

If the key already exists, it is overwritten.

Parameters:

  • key (String): the key name
  • value (String): the value for the key
String buildString(byVal input)
Takes an input string, replacing all occurrences of keys with their values.

If this ContentValues contains a key "NAME" with a value of "John Smith", passing an input string containing "Hello %NAME%" will return "Hello John Smith".

Parameters:

  • input (String): the string to insert values into

Returns: the input string with all occurrences of keys replaced with their values.

Bool exists(byVal key)
Checks if a key exists within this ContentValues instance.

Parameters:

  • key (String): the key to look for

Returns: True if the key exists.

- remove(byVal key)
Removes a key from this ContentValues instance.

Parameters:

  • key (String): the key name to remove