[Turn on line numbering]arg string; var children, child_names, c; children = .children(); child_names = children.mmap('name); // direct matches first. for c in (child_names) { if (c == string) return children[c in child_names]; } // ok, try partial matches for c in (child_names) { if ($string.match_begin(c, string)) return children[c in child_names]; } return 0;
["// Created as a part of ColdCore, see: @help Credit"]