| 24 | } |
| 25 | |
| 26 | std::vector<String> FeatureUtility::GetFieldCompletionSuggestions(const String& word, bool enable) |
| 27 | { |
| 28 | std::vector<String> cache; |
| 29 | std::vector<String> suggestions; |
| 30 | |
| 31 | GetFeatures(cache, enable); |
| 32 | |
| 33 | std::sort(cache.begin(), cache.end()); |
| 34 | |
| 35 | for (const String& suggestion : cache) { |
| 36 | if (suggestion.Find(word) == 0) |
| 37 | suggestions.push_back(suggestion); |
| 38 | } |
| 39 | |
| 40 | return suggestions; |
| 41 | } |
| 42 | |
| 43 | int FeatureUtility::EnableFeatures(const std::vector<std::string>& features) |
| 44 | { |