LibWebView: Add an API to format a search query for UI display

This will create a string of the form:

    Search DuckDuckGo for "Ladybird is awesome!"

If the provided query URL is unknown, the engine name is excluded (e.g.
for custom search URLs).
This commit is contained in:
Timothy Flynn 2023-10-23 16:41:36 -04:00 committed by Andreas Kling
commit e221b3afeb
Notes: sideshowbarker 2024-07-16 23:55:09 +09:00
2 changed files with 34 additions and 0 deletions

View file

@ -19,5 +19,7 @@ struct SearchEngine {
ReadonlySpan<SearchEngine> search_engines();
SearchEngine const& default_search_engine();
Optional<SearchEngine const&> find_search_engine_by_name(StringView name);
Optional<SearchEngine const&> find_search_engine_by_query_url(StringView query_url);
String format_search_query_for_display(StringView query_url, StringView query);
}