searching elements of an array within another array
From: diffused (vckorovski_at_dialectsolutions.com)
Date: 07/30/04
- Next message: Jacob: "Re: searching elements of an array within another array"
- Previous message: Roedy Green: "Re: Negation of boolean"
- Next in thread: Jacob: "Re: searching elements of an array within another array"
- Reply: Jacob: "Re: searching elements of an array within another array"
- Reply: Oscar kind: "Re: searching elements of an array within another array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Jul 2004 22:40:49 -0700
Is it possible to search using each element in a array, to see if it
exists in another array?
I have two string arrays, one is hardcoded, the other one is parsed
from a XML file.
String[] arrayStrField = {"ClinicId","ClinicName",
"KmRangePostcode","Suburb","State","ClinicPostcode", "Doc",
"DateLastChanged", "AdditionalPostcodes", "ClinicStatus",
"ClinicURL"};
pXmlMsg.mArrField[i] = pXmlField.getElement(i).asString();
How would i search element by element in the mArrField to see if each
element exists as one of the elements in the arrayStrField?
ie ..
boolean activeField = checkFieldArray(arrayStrField,
xmlMess.mArrField);
private boolean checkFieldArray(String[] arrayStrCheck, String[]
arrayStrVar)
{
boolean b = false;
// if (all arrStrVar[i] do exist in arrayStrCheck[]
{
b = true;
}
return b;
}
how would i go about doing this?
- Next message: Jacob: "Re: searching elements of an array within another array"
- Previous message: Roedy Green: "Re: Negation of boolean"
- Next in thread: Jacob: "Re: searching elements of an array within another array"
- Reply: Jacob: "Re: searching elements of an array within another array"
- Reply: Oscar kind: "Re: searching elements of an array within another array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|