1717#include < unordered_map>
1818#include < vector>
1919
20+ #include " flashlight/lib/text/Defines.h"
21+
2022namespace fl {
2123namespace lib {
2224
@@ -32,37 +34,39 @@ using EnableIfSame = typename std::enable_if<std::is_same<S, T>::value>::type;
3234// ================================== Functions
3335// ==================================
3436
35- std::string trim (const std::string& str);
37+ FL_TEXT_API std::string trim (const std::string& str);
3638
37- void replaceAll (
38- std::string& str,
39- const std::string& from,
40- const std::string& repl);
39+ FL_TEXT_API void
40+ replaceAll (std::string& str, const std::string& from, const std::string& repl);
4141
42- bool startsWith (const std::string& input, const std::string& pattern);
43- bool endsWith (const std::string& input, const std::string& pattern);
42+ FL_TEXT_API bool startsWith (
43+ const std::string& input,
44+ const std::string& pattern);
45+ FL_TEXT_API bool endsWith (const std::string& input, const std::string& pattern);
4446
45- std::vector<std::string>
47+ FL_TEXT_API std::vector<std::string>
4648split (char delim, const std::string& input, bool ignoreEmpty = false );
4749
48- std::vector<std::string> split (
50+ FL_TEXT_API std::vector<std::string> split (
4951 const std::string& delim,
5052 const std::string& input,
5153 bool ignoreEmpty = false );
5254
53- std::vector<std::string> splitOnAnyOf (
55+ FL_TEXT_API std::vector<std::string> splitOnAnyOf (
5456 const std::string& delim,
5557 const std::string& input,
5658 bool ignoreEmpty = false );
5759
58- std::vector<std::string> splitOnWhitespace (
60+ FL_TEXT_API std::vector<std::string> splitOnWhitespace (
5961 const std::string& input,
6062 bool ignoreEmpty = false );
6163
6264/* *
6365 * Join a vector of `std::string` inserting `delim` in between.
6466 */
65- std::string join (const std::string& delim, const std::vector<std::string>& vec);
67+ FL_TEXT_API std::string join (
68+ const std::string& delim,
69+ const std::vector<std::string>& vec);
6670
6771/* *
6872 * Join a range of `std::string` specified by iterators.
@@ -126,5 +130,6 @@ void dedup(std::vector<T>& in) {
126130 auto it = std::unique (in.begin (), in.end ());
127131 in.resize (std::distance (in.begin (), it));
128132}
133+
129134} // namespace lib
130135} // namespace fl
0 commit comments