Gets the number of key-value pairs in an SRP Hash Table.
Syntax
Count = SRP_HashTable("Count", Handle)
Returns
The number of elements in the hash table
Parameters
| Parameter | Description |
|---|---|
| Handle | Handle to an existing SRP Hash Table (REQUIRED) |
Remarks
The Count service gets the number of key-value pairs in an SRP Hash Table.
Examples
// Create a case-insensitive hash table
Handle = SRP_HashTable("Create")
// Add some entries
SRP_HashTable("Set", Handle, "Amazon", "http://www.amazon.com")
SRP_HashTable("Set", Handle, "Google", "http://www.google.com")
SRP_HashTable("Set", Handle, "Revelation", "http://www.revelation.com")
SRP_HashTable("Set", Handle, "SRP", "http://www.srpcs.com")
SRP_HashTable("Set", Handle, "Yahoo", "http://www.yahoo.com")
// This will return 5
Count = SRP_HashTable("Count", Handle)
// Clean up
SRP_HashTable("Release", Handle)