Removes a key and it's paired value from an SRP Hash Table.
Syntax
SRP_HashTable_Remove(Handle, Key)
Parameters
Parameter | Description |
---|---|
Handle | Handle to an existing SRP Hash Table (REQUIRED) |
Key | The key to remove (REQUIRED) |
Remarks
The SRP_HashTable_Remove method removes a key and it's paired value from an SRP Hash Table. If the key doesn't exist, then nothing happens.
IMPORTANT: You should always release the handle to an SRP Hash Table when you no longer need it by calling SRP_HashTable_Release.
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") SRP_HashTable_Set(Handle, "Empty", "") // The key exists Exists = SRP_HashTable_Contains(Handle, "SRP") // Remove one SRP_HashTable_Remove(Handle, "SRP") // The key no longer exists Exists = SRP_HashTable_Contains(Handle, "SRP") // Release it SRP_HashTable_Release(Handle)