lib/demangler/prefix-tree.js
// most recent match (if any), which will be our return value.
most recent match (if any), which will be our return value.
most recent match ( if any ) which will be our return value .
findLongestMatch(needle) {
        let node = this.root;
        let match = [null, null];
        for (let i = 0; i < needle.length; ++i) {
            const character = needle.codePointAt(i);
            node = node[character];
            if (!node) break;
            if (node.result) match = [needle.substr(0, i + 1), node.result];
        }
        return match;
    }
findLongestMatch ( needle ) { let node = this . root ; let match = [ null , null ] ; for ( let i = 0 ; i < needle . length ; ++ i ) { const character = needle . codePointAt ( i ) ; node = node [ character ] ; if ( ! node ) break ; if ( node . result ) match = [ needle . substr ( 0 , i + 1 ) , node . result ] ; } return match ; }
most recent match (if any), which will be our return value.
most recent match ( if any ) which will be our return value .