blob: 982d6bc5cb1269db65bdd50b8fdc9aeea5ad685d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
https://svnweb.freebsd.org/ports/head/sysutils/xstow/files/patch-src__string_utils.h?revision=319588&view=co&pathrev=319588
https://svnweb.freebsd.org/ports/head/sysutils/xstow/files/patch-src__leoini.h?revision=319588&view=co&pathrev=319588
https://bugs.gentoo.org/840359
https://bugs.gentoo.org/729114
--- a/src/leoini.h
+++ b/src/leoini.h
@@ -260,11 +260,9 @@
if( start == std::string::npos ||
end == std::string::npos )
- s = "";
- else
- s = s.substr( start+1, start-end -1 );
+ return s2x<A>("");
- return s2x<A>(s);
+ return s2x<A>(s.substr( start+1, start-end -1 ));
}
} // namespace Leo
--- a/src/string_utils.h
+++ b/src/string_utils.h
@@ -28,6 +28,9 @@
# define STRSTREAM
#endif
+typedef std::vector<std::string> vec_string;
+std::ostream& operator<<( std::ostream& out, const vec_string &v );
+
std::string toupper( std::string s );
std::string strip( const std::string& str, const std::string& what = " \t\n\0" );
bool is_int( const std::string &s );
|