URLSearchParams

Overview

The URLSearchParams interface defines utility methods to work with the query string of a URL.

Location

Required Methods


append

Appends a specified key/value pair as a new search parameter.

 

method append(parname: dynamic; parvalue: dynamic)

 

void append(dynamic parname, dynamic parvalue)

 

func append(_ parname: dynamic, _ parvalue: dynamic)

 

void append(dynamic parname, dynamic parvalue)

 

Sub append(parname As dynamic, parvalue As dynamic)

Parameters:

  • parname:
  • parvalue:

delete

Deletes the given search parameter, and its associated value, from the list of all search parameters.

 

method delete(parname: dynamic)

 

void delete(dynamic parname)

 

func delete(_ parname: dynamic)

 

void delete(dynamic parname)

 

Sub delete(parname As dynamic)

Parameters:

  • parname:

entries

Returns an iterator allowing iteration through all key/value pairs contained in this object.

 

method entries: dynamic

 

dynamic entries()

 

func entries() -> dynamic

 

dynamic entries()

 

Function entries() As dynamic

forEach

Allows iteration through all values contained in this object via a callback function.

 

method forEach(parcallback: dynamic): dynamic

 

dynamic forEach(dynamic parcallback)

 

func forEach(_ parcallback: dynamic) -> dynamic

 

dynamic forEach(dynamic parcallback)

 

Function forEach(parcallback As dynamic) As dynamic

Parameters:

  • parcallback:

get

Returns the first value associated with the given search parameter.

 

method get(parname: dynamic): String

 

String get(dynamic parname)

 

func get(_ parname: dynamic) -> String

 

String get(dynamic parname)

 

Function get(parname As dynamic) As String

Parameters:

  • parname:

getAll

Returns all the values associated with a given search parameter.

 

method getAll(parname: dynamic): String

 

String getAll(dynamic parname)

 

func getAll(_ parname: dynamic) -> String

 

String getAll(dynamic parname)

 

Function getAll(parname As dynamic) As String

Parameters:

  • parname:

has

Returns a Boolean indicating if such a given parameter exists.

 

method has(parname: dynamic): Boolean

 

Boolean has(dynamic parname)

 

func has(_ parname: dynamic) -> Boolean

 

Boolean has(dynamic parname)

 

Function has(parname As dynamic) As Boolean

Parameters:

  • parname:

keys

Returns an iterator allowing iteration through all keys of the key/value pairs contained in this object.

 

method keys: dynamic

 

dynamic keys()

 

func keys() -> dynamic

 

dynamic keys()

 

Function keys() As dynamic

set

Sets the value associated with a given search parameter to the given value. If there are several values, the others are deleted.

 

method set(parname: dynamic; parvalue: dynamic)

 

void set(dynamic parname, dynamic parvalue)

 

func set(_ parname: dynamic, _ parvalue: dynamic)

 

void set(dynamic parname, dynamic parvalue)

 

Sub set(parname As dynamic, parvalue As dynamic)

Parameters:

  • parname:
  • parvalue:

sort

Sorts all key/value pairs, if any, by their keys.

 

method sort

 

void sort()

 

func sort()

 

void sort()

 

Sub sort()

toString

Returns a string containing a query string suitable for use in a URL.

 

method toString: String

 

String toString()

 

func toString() -> String

 

String toString()

 

Function toString() As String

values

Returns an iterator allowing iteration through all values of the key/value pairs contained in this object.

 

method values: dynamic

 

dynamic values()

 

func values() -> dynamic

 

dynamic values()

 

Function values() As dynamic