On 24/02/12 15:18, Alex Rønne Petersen wrote:
On 24-02-2012 15:08, bearophile wrote:
I have seen this C++11 program:
http://kaizer.se/wiki/log/post/C++_constexpr/
I have translated it to this D code:
bool notEnd(const char *s, const int n) {
return s&& s[n];
}
bool strPrefix(const char *s, co
On 24-02-2012 15:08, bearophile wrote:
I have seen this C++11 program:
http://kaizer.se/wiki/log/post/C++_constexpr/
I have translated it to this D code:
bool notEnd(const char *s, const int n) {
return s&& s[n];
}
bool strPrefix(const char *s, const char *t, const int ns, const int nt)
I have seen this C++11 program:
http://kaizer.se/wiki/log/post/C++_constexpr/
I have translated it to this D code:
bool notEnd(const char *s, const int n) {
return s && s[n];
}
bool strPrefix(const char *s, const char *t, const int ns, const int nt) {
return (s == t) ||
!t[nt]