Table of Contents

About

Returns a list of all the values 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:

wasKeyValueGetValues(kvp);

the function will return the list:

[ "empty", "off" ];

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 wasKeyValueGetValues(string data) {
    return llList2ListStrided(
        llDeleteSubList(
            llParseString2List(
                data, 
                ["&", "="], 
                []
            ), 
            0, 
            0
        ), 
        0, 
        -1, 
        2
    );
}