Project

General

Profile

Previous Up Next

switchstr
This function searches in the list of 2-tuples the one which first element is the same string than the specific _string_ (it performs a 'strcmp' test). It this tuple is found, the function returns the second element of the tuple, else it returns nil.

u0 switchstr (
[[S u0] r1] _list_
S _string_
)
Parameters

_list_
list of 2-tuples whose first element is a string
_string_
string to search in the list
Return value

value associated to the _string_

Error :

  • EOK if success.