filter tree by attribute finding, this is faster than matching
bool tree_filter_by_attrib_find( TreeNode & tr, int iUnitNodeID, LPCSTR lpcstrAttrib, LPCSTR lpcstrSub, bool bCaseSensitive = false, bool bMustBeginWith = false )
Always returns true; except tr is invalid, will return false.
EX1
int tree_filter_by_attrib_find_ex1() { Tree tr; tr.Root.First.SetAttribute(STR_LABEL_ATTRIB, "aaa"); tr.Root.First.DataID = 1; tr.Root.Second.SetAttribute(STR_LABEL_ATTRIB, "aaa bbb"); tr.Root.Second.DataID = 2; tree_filter_by_attrib_find(tr, tr.Root.First.DataID, STR_LABEL_ATTRIB, "aaa", true, true); return 1; }
tree_filter_by_attrib_match
origin.h