Find all words starting with a prefix.

        Args:
            prefix: A prefix to be searched for.

        Returns:
            A list of all words found.
551522
def starts_with(self, prefix):
        
        prefix = prefix.lower()
        found_words = []

        res = cgaddag.gdg_starts_with(self.gdg, prefix.encode(encoding="ascii"))
        tmp = res

        while tmp:
            word = tmp.contents.str.decode("ascii")
            found_words.append(word)
            tmp = tmp.contents.next

        cgaddag.gdg_destroy_result(res)
        return found_words
1291187
public static Predicate<String> startsWith(final String prefix) {
		return new Predicate<String>() {
			@Override
			public boolean apply(final String input) {
				return input.startsWith(prefix);
			}
		};
	}
346680
def find_all(self, prefix):
        '''
        
        '''
        prefix = ip_network(prefix)

        # Check that we are authoritative for the given prefix
        if not self.prefix.overlaps(prefix) \
        or self.prefix[0] > prefix[0] \
        or self.prefix[-1] < prefix[-1]:
            raise NotAuthoritativeError('This node is not authoritative for %r'
                                        % prefix)

        # Find all matching existing prefixes and return them in a set
        matches = set()
        for child in self.children:
            if prefix.overlaps(child.prefix):
                matches.add(child)

        return matches
1341925
def get_prefix(self):
        """"""
        prefix = self.bucket
        if self.prefix:
            prefix += self.delimiter + self.prefix
        return prefix
297544
def prefix(self, keys):
        
        assert isinstance(keys, tuple)

        self._prefix = keys
        self._load_prefix_binding()
96200
public List<String> getExtensionPoints(String prefix,String suffix){
		return extensionPointsCache.get(prefix+"@"+suffix);
	}
303973
def lchop(string, prefix):
    
    if string.startswith(prefix):
        return string[len(prefix):]
    return string
848805
def _allKeys(self, prefix):
        
        global dictItemsIter
        result = [prefix + self.key] if self.key != None else []
        for key, trie in dictItemsIter(self.slots):        
            result.extend(trie._allKeys(prefix + key))        
        return result
1157489
def find_next_word_beginning(self, count=1, WORD=False):
        
        if count < 0:
            return self.find_previous_word_beginning(count=-count, WORD=WORD)

        regex = _FIND_BIG_WORD_RE if WORD else _FIND_WORD_RE
        iterator = regex.finditer(self.text_after_cursor)

        try:
            for i, match in enumerate(iterator):
                # Take first match, unless it's the word on which we're right now.
                if i == 0 and match.start(1) == 0:
                    count += 1

                if i + 1 == count:
                    return match.start(1)
        except StopIteration:
            pass
815914
def get_prefixes(self, ns_uri):
        """"""
        ni = self.__lookup_uri(ns_uri)
        return ni.prefixes.copy()
942974
def start_with(prefix, beg, len)
      s = @s
      c = @cur
      if @len - c < len
        return false
      end
      word = s.unpack("U*")[c]
      if word.nil?
        return (prefix.slice(beg, len-beg) == nil)
      else
        [word].pack("U*").starts_with?(prefix.slice(beg, len-beg))
      end
    end
811003
def sort_prefixes(orig, prefixes='@+'):
    
    new = ''
    for prefix in prefixes:
        if prefix in orig:
            new += prefix
    return new
434773
def getprefix(self, u):
        
        for ns in Namespace.all:
            if u == ns[1]:
                return ns[0]
        for ns in self.prefixes:
            if u == ns[1]:
                return ns[0]
        raise Exception('ns (%s) not mapped' % u)
806192
def search(self, word, limit=30):
        
        search = Search(PrefixQuery("word", word), sort={"count": "desc"})
        for doc in self.connection.search(
                search, indexes=[self.index], count=limit):
            yield (doc["word"], doc["count"])
75791
def getprefixes(self):
        """"""
        namespaces = []
        for l in (self.params, self.types):
            for t,r in l:
                ns = r.namespace()
                if ns[1] is None: continue
                if ns[1] in namespaces: continue
                if Namespace.xs(ns) or Namespace.xsd(ns):
                    continue
                namespaces.append(ns[1])
                if t == r: continue
                ns = t.namespace()
                if ns[1] is None: continue
                if ns[1] in namespaces: continue
                namespaces.append(ns[1])
        i = 0
        namespaces.sort()
        for u in namespaces:
            p = self.nextprefix()
            ns = (p, u)
            self.prefixes.append(ns)
358812
def find_by_prefix(prefix)
      @machines.each do |uuid, data|
        return data.merge("id" => uuid) if uuid.start_with?(prefix)
      end

      nil
    end
575102
def remove_prefix(self, prefix):
        
        if prefix not in self.__prefix_map:
            return

        ni = self.__lookup_prefix(prefix)
        ni.prefixes.discard(prefix)
        del self.__prefix_map[prefix]

        # If we removed the preferred prefix, find a new one.
        if ni.preferred_prefix == prefix:
            ni.preferred_prefix = next(iter(ni.prefixes), None)