--- a/ddd/strclass.h Fri Mar 28 09:05:06 2014 +0000
+++ b/ddd/strclass.h Fri Mar 28 09:05:50 2014 +0000
@@ -543,6 +543,13 @@
bool OK() const;
};
+extern string common_prefix(const string& x, const string& y,
+ int startpos = 0);
+extern string common_suffix(const string& x, const string& y,
+ int startpos = -1);
+extern int readline(std::istream& s, string& x,
+ char terminator = '\n',
+ int discard_terminator = 1);
class string
{
@@ -810,10 +817,8 @@
friend int split(const string& x, string *res, int maxn,
const regex& sep);
- friend string common_prefix(const string& x, const string& y,
- int startpos = 0);
- friend string common_suffix(const string& x, const string& y,
- int startpos = -1);
+ friend string common_prefix(const string& x, const string& y, int startpos);
+ friend string common_suffix(const string& x, const string& y, int startpos);
friend string replicate(char c, int n);
friend string replicate(const string& y, int n);
friend string join(const string *src, int n, const string& sep);
@@ -864,8 +869,8 @@
friend std::istream& operator>>(std::istream& s, string& x);
friend int readline(std::istream& s, string& x,
- char terminator = '\n',
- int discard_terminator = 1);
+ char terminator,
+ int discard_terminator);
// Status
unsigned int length() const;
Thanks for info
ReplyDelete