diff --git a/include/dindexer-core/split.hpp b/include/dindexer-core/split.hpp
new file mode 100644
index 0000000..2e9e41e
--- /dev/null
+++ b/include/dindexer-core/split.hpp
@@ -0,0 +1,29 @@
+/* Copyright 2015, 2016, Michele Santullo
+ * This file is part of "dindexer".
+ *
+ * "dindexer" is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * "dindexer" is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with "dindexer". If not, see .
+ */
+
+#ifndef id913CE9D2F60745349F39F2C82455973E
+#define id913CE9D2F60745349F39F2C82455973E
+
+#include
+#include
+#include "duckhandy/compatibility.h"
+
+namespace dincore {
+ std::vector split ( boost::string_ref parList, char parSeparator, bool parTrim, bool parDeleteEmpty ) a_pure;
+} //namespace dincore
+
+#endif
diff --git a/include/dindexer-core/split_tags.hpp b/include/dindexer-core/split_tags.hpp
index 26f1059..cbdc597 100644
--- a/include/dindexer-core/split_tags.hpp
+++ b/include/dindexer-core/split_tags.hpp
@@ -15,17 +15,22 @@
* along with "dindexer". If not, see .
*/
-#ifndef id913CE9D2F60745349F39F2C82455973E
-#define id913CE9D2F60745349F39F2C82455973E
+#ifndef idABF7D6D669F445B2852C4DDFC29C701E
+#define idABF7D6D669F445B2852C4DDFC29C701E
-#include
-#include
-#include "duckhandy/compatibility.h"
+#include "dindexer-core/split.hpp"
namespace dincore {
- std::vector split_and_trim ( boost::string_ref parList, char parSeparator ) a_pure;
std::vector split_tags ( boost::string_ref parCommaSeparatedList ) a_pure;
- std::vector split ( boost::string_ref parList, char parSeparator, bool parTrim, bool parDeleteEmpty ) a_pure;
+ std::vector split_and_trim ( boost::string_ref parCommaSeparatedList, char parSeparator ) a_pure;
+
+ inline std::vector split_tags (boost::string_ref parCommaSeparatedList) {
+ return split(parCommaSeparatedList, ',', true, true);
+ }
+
+ inline std::vector split_and_trim (boost::string_ref parCommaSeparatedList, char parSeparator) {
+ return split(parCommaSeparatedList, parSeparator, true, true);
+ }
} //namespace dincore
#endif
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index db7fa9b..ad9b80f 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -2,7 +2,7 @@ project(${bare_name}-core CXX)
add_library(${PROJECT_NAME} SHARED
searchpaths.cpp
- split_tags.cpp
+ split.cpp
)
target_link_libraries(${PROJECT_NAME}
diff --git a/src/core/split_tags.cpp b/src/core/split.cpp
similarity index 90%
rename from src/core/split_tags.cpp
rename to src/core/split.cpp
index 3dc9422..eba86d4 100644
--- a/src/core/split_tags.cpp
+++ b/src/core/split.cpp
@@ -15,7 +15,7 @@
* along with "dindexer". If not, see .
*/
-#include "dindexer-core/split_tags.hpp"
+#include "dindexer-core/split.hpp"
#include
#include
#include
@@ -25,14 +25,6 @@
#include
namespace dincore {
- std::vector split_tags (boost::string_ref parCommaSeparatedList) {
- return split(parCommaSeparatedList, ',', true, true);
- }
-
- std::vector split_and_trim (boost::string_ref parList, char parSeparator) {
- return split(parList, parSeparator, true, true);
- }
-
std::vector split (boost::string_ref parList, char parSeparator, bool parTrim, bool parDeleteEmpty) {
using OutRange = boost::iterator_range;
using boost::token_finder;