Table of Contents

About

Returns a list of all the keys in a key-value data string.

Comments

Error Handling

Example Usage

Suppose that the key-value data contains:

string kvp = "data=empty&movement=off"

when calling the function with:

wasKeyValueGetKeys(kvp);

the function will return the list:

[ "data", "movement" ];

Code

This script was tested and works on OpenSim version 0.7.4!

///////////////////////////////////////////////////////////////////////////
//    Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0    //
///////////////////////////////////////////////////////////////////////////
list wasKeyValueGetKeys(string data) {
    return llList2ListStrided(
        llParseString2List(
            data, 
            ["&", "="], 
            []
        ), 
        0, 
        -1, 
        2
    );
}