Searching for character arrays

So another problem. I have a hierachy of objects and they all have names such as ‘cube’ etc but now i need to search through to get to this object but i dont have a clue how to search for this character array. I know how to search through the hiearchy its just i dont know how to find a certain string. Does this make sense?? my brains on a complete shutdown today agh!

if (strcmp(searchedName,name[i])==0) {
   // found !!