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: 2022/04/19 08:28 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


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