Add normalize_script_path() zeek::zeekygen::detail namespace

This commit is contained in:
Jon Siwek 2021-02-26 14:49:00 -08:00
parent 9ced370b48
commit c95a364ff7
3 changed files with 33 additions and 24 deletions

View file

@ -64,4 +64,14 @@ bool is_all_whitespace(const std::string& s);
*/
std::string redef_indication(const std::string& from_script);
/**
* Turns a script's path into a shortened, normalized version that
* can be used for indexing and cross-referencing links.
*
* @param path the associate path to a Zeek script, which may be absolute.
*
* @return a normalized/shortened path (containing no ZEEKPATH components)
*
*/
std::string normalize_script_path(std::string_view path);
} // namespace zeek::zeekygen::detail