From c88af976ff4ff0564db5d7c221e2888df4dfe0a9 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 24 Dec 2020 22:36:43 +0000 Subject: Add a function for shrinking module names. --- include/modules.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/modules.h b/include/modules.h index 20ba81167..290aa9ee6 100644 --- a/include/modules.h +++ b/include/modules.h @@ -1072,12 +1072,19 @@ class CoreExport ModuleManager ServiceList* NewServices; /** Expands the name of a module by prepending "m_" and appending ".so". - * No-op if the name already has the ".so" extension. + * No-op if the name is already expanded. * @param modname Module name to expand * @return Module name starting with "m_" and ending with ".so" */ static std::string ExpandModName(const std::string& modname); + /** Shrinks the name of a module by removing the "m_" prefix and ".so" suffix. + * No-op if the name is already shrunk. + * @param modname Module name to expand + * @return Module name with the "m_" prefix and ".so" suffix removed. + */ + static std::string ShrinkModName(const std::string& modname); + /** Change the priority of one event in a module. * Each module event has a list of modules which are attached to that event type. * If you wish to be called before or after other specific modules, you may use this -- cgit v1.3.1-10-gc9f91