//Title: isDirectChild //Credit to: Darkcampainger //Contributed by: DarkCampainger
// Returns if childType is a direct child of parentType proc/isDirectChild(childType, parentType) // Check if the child is derived form the parent at all if(!ispath(childType,parentType)) return 0 // Check that the types are not equivalent if(childType == parentType) return 0 // If it's the direct descendant, there should only be one more / in its type return !findtext("[childType]","/",length("[parentType]")+2)