Skip to content

Commit 95ffa02

Browse files
committed
Fix string_methods
1 parent f1adc0f commit 95ffa02

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

include/chaiscript/extras/string_methods.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ namespace chaiscript {
2121
namespace string_methods {
2222
ModulePtr bootstrap(ModulePtr m = std::make_shared<Module>())
2323
{
24-
// Add lists of strings.
25-
m->add(bootstrap::standard_library::vector_type<std::vector<std::string>>("StringVector"));
26-
2724
// string::replace(std::string search, std::string replace)
2825
m->add(fun([](const std::string& subject, const std::string& search, const std::string& replace) {
2926
std::string result(subject);

tests/string_methods.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ TEST_CASE( "string_methods functions work", "[string_methods]" ) {
1212

1313
// Add the string_methods module.
1414
auto stringmethods = chaiscript::extras::string_methods::bootstrap();
15+
chai.add(chaiscript::bootstrap::standard_library::vector_type<std::vector<std::string>>("StringVector"));
1516
chai.add(stringmethods);
1617

1718
// replace(string, string)
@@ -31,4 +32,4 @@ TEST_CASE( "string_methods functions work", "[string_methods]" ) {
3132

3233
// toUpperCase()
3334
CHECK(chai.eval<std::string>("\"Hello World!\".toUpperCase()") == "HELLO WORLD!");
34-
}
35+
}

0 commit comments

Comments
 (0)