About

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

Comments

  • Requires a key-value data string.

Error Handling

  • Will return the empty list in case the key-value data string is empty.

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
    );
}

fuss/data_structures/key-value_pairs/getvalues.txt ยท Last modified: 2019/01/03 01:38 (external edit)

Access website using Tor Access website using i2p


For the copyright, license, warranty and privacy terms for the usage of this website please see the license, privacy and plagiarism pages.