{"action":"created","issue":{"url":"https://api.github.com/repos/kmike/marisa-trie/issues/14","repository_url":"https://api.github.com/repos/kmike/marisa-trie","labels_url":"https://api.github.com/repos/kmike/marisa-trie/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/kmike/marisa-trie/issues/14/comments","events_url":"https://api.github.com/repos/kmike/marisa-trie/issues/14/events","html_url":"https://github.com/kmike/marisa-trie/issues/14","id":45589135,"number":14,"title":"Needs find-longest key method","user":{"login":"KCzar","id":6180101,"avatar_url":"https://avatars.githubusercontent.com/u/6180101?v=3","gravatar_id":"","url":"https://api.github.com/users/KCzar","html_url":"https://github.com/KCzar","followers_url":"https://api.github.com/users/KCzar/followers","following_url":"https://api.github.com/users/KCzar/following{/other_user}","gists_url":"https://api.github.com/users/KCzar/gists{/gist_id}","starred_url":"https://api.github.com/users/KCzar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KCzar/subscriptions","organizations_url":"https://api.github.com/users/KCzar/orgs","repos_url":"https://api.github.com/users/KCzar/repos","events_url":"https://api.github.com/users/KCzar/events{/privacy}","received_events_url":"https://api.github.com/users/KCzar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-10-12T18:34:56Z","updated_at":"2016-05-05T16:30:48Z","closed_at":null,"body":"Or we could just call it a \"longest\" method - or \"prefix\" method (singular).  Is there an efficient way to find the longest key that is a prefix of a string that I'm overlooking?  It could be done with the current implementation by simply using prefixes, then finding the longest match, but there should be a much more efficient way possible by taking advantage of the Trie properties.  \r\n\r\nI can give it a go if you like - unless it's already implemented and I'm simply missing it.  "},"comment":{"url":"https://api.github.com/repos/kmike/marisa-trie/issues/comments/217202490","html_url":"https://github.com/kmike/marisa-trie/issues/14#issuecomment-217202490","issue_url":"https://api.github.com/repos/kmike/marisa-trie/issues/14","id":217202490,"user":{"login":"stuaxo","id":179677,"avatar_url":"https://avatars.githubusercontent.com/u/179677?v=3","gravatar_id":"","url":"https://api.github.com/users/stuaxo","html_url":"https://github.com/stuaxo","followers_url":"https://api.github.com/users/stuaxo/followers","following_url":"https://api.github.com/users/stuaxo/following{/other_user}","gists_url":"https://api.github.com/users/stuaxo/gists{/gist_id}","starred_url":"https://api.github.com/users/stuaxo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuaxo/subscriptions","organizations_url":"https://api.github.com/users/stuaxo/orgs","repos_url":"https://api.github.com/users/stuaxo/repos","events_url":"https://api.github.com/users/stuaxo/events{/privacy}","received_events_url":"https://api.github.com/users/stuaxo/received_events","type":"User","site_admin":false},"created_at":"2016-05-05T16:30:48Z","updated_at":"2016-05-05T16:30:48Z","body":"^ I guess what I ~~wanted~~ needed here is the 'roots' of the Trie."}}