Difference between revisions of "IsInStrArr MEL"

From scripting
Jump to: navigation, search
(Created page with " global proc int IsInStrArr(string $Str[], string $CompareStr) { //0001D LLC 2015 Nick Pisca //string $Str[] = {"dd","ee","FF"}; string $CompareStr = "ee"; //IsInStrArr(...")
 
(No difference)

Latest revision as of 06:59, 22 April 2017

global proc int IsInStrArr(string $Str[], string $CompareStr) {
	//0001D LLC 2015 Nick Pisca
	//string $Str[] = {"dd","ee","FF"}; string $CompareStr = "ee";
	//IsInStrArr({"dd","ee","FF"}, "ff");
	for ($x=0;$x<size($Str);$x++) {
		if ($Str[$x] == $CompareStr) {
			return 1;
		}
	}
 	return 0;
}



More information on strings and arrays, read pages 28-37 in YSYT.