Sets an element into an SRP List at the given index position.
Syntax
SRP_List_SetAt(Handle, Index, Element)
Parameters
Parameter | Description |
---|---|
Handle | Handle to an existing SRP List (REQUIRED) |
Index | The position within the SRP List at which the element will be placed (REQUIRED) |
Element | The value to insert into the SRP List (REQUIRED) |
Remarks
The SRP_List_SetAt method sets a value into an SRP List at the given position. SRP_List_SetAt differs from SRP_List_InsertAt in that it will replace the element at that location if one already exists.
IMPORTANT: You should always release the handle to an SRP List when you no longer need it by calling SRP_List_Release.
Examples
// Create the list Handle = SRP_List_Create() // Set elements at several locations SRP_List_SetAt(Handle, 1, "ABC") SRP_List_SetAt(Handle, 5, "DEF") SRP_List_SetAt(Handle, 1, "EFG") // Convert the SRP List into a normal list List = SRP_List_GetVariable(Handle, ",") // List = "EFG,,,,DEF" // Play nice with memory SRP_List_Release(Handle)