MCPcopy Create free account
hub / github.com/crawl/crawl / getFAQ_Answer

Function getFAQ_Answer

crawl-ref/source/database.cc:902–914  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

900}
901
902string getFAQ_Answer(const string &question)
903{
904 string key = "a" + question.substr(1, question.length()-1);
905 string val = unwrap_desc(_query_database(FAQDB, key, false, true));
906
907 // Remove blank lines between items on a bulleted list, for small
908 // terminals' sake. Far easier to store them as separated paragraphs
909 // in the source.
910 // Also, use a nicer bullet as we're already here.
911 val = replace_all(val, "\n\n*", "\n•");
912
913 return val;
914}
915
916/////////////////////////////////////////////////////////////////////////////
917// Miscellaneous DB specific functions.

Callers 1

_handle_FAQFunction · 0.85

Calls 4

unwrap_descFunction · 0.85
_query_databaseFunction · 0.85
replace_allFunction · 0.85
substrMethod · 0.80

Tested by

no test coverage detected