Lasso Soft Inc. > Home


AuthorBil Corry
LicensePublic Domain
Posted03 Dec 2005
Updated03 Dec 2005
More by this author...


Evaluates if a value is contained within a list of elements.  Returns true or false.

Sample Usage


Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.


	-description='Searches a list of elements for an item.  Returns true or false.',
	-required='value', -copy,
	local:'trim' = true;
	if: params->(find:'-notrim') > 0;
		local:'trim' = false;
	else: #value->type == 'string';

	if: #list->type == 'array';
		local:'listarray' = #list;
		if: local_defined:'list_delimiter';
			local:'listarray' = (string:#list)->(split:#list_delimiter);
		else; // assume comma-delimited
			local:'listarray' = (string:#list)->(split:',');

	iterate: #listarray, local:'item';
		if: #trim && #item->type == 'string';
		if: #item == #value;
			return: true;
	return: false;




No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home



©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft