⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 p784.c

📁 linux下的gcc编译器
💻 C
📖 第 1 页 / 共 5 页
字号:
}inline int String::matches(const SubString& y, int p) const{  return match(p, length(), 1, y.chars(), y.length()) >= 0;}inline int String::matches(const String& y, int p) const{  return match(p, length(), 1, y.chars(), y.length()) >= 0;}inline int String::matches(const char* t, int p) const{  return match(p, length(), 1, t) >= 0;}inline int String::matches(char c, int p) const{  return match(p, length(), 1, &c, 1) >= 0;}inline int String::matches(const Regex& r, int p) const{  int l = (p < 0)? -p : length() - p;  return r.match(chars(), length(), p) == l;}inline int SubString::contains(const char* t) const{  return S.search(pos, pos+len, t) >= 0;}inline int SubString::contains(const String& y) const{  return S.search(pos, pos+len, y.chars(), y.length()) >= 0;}inline int SubString::contains(const SubString&  y) const{  return S.search(pos, pos+len, y.chars(), y.length()) >= 0;}inline int SubString::contains(char c) const{  return S.search(pos, pos+len, 0, c) >= 0;}inline int SubString::contains(const Regex& r) const{  int unused;  return r.search(chars(), len, unused, 0) >= 0;}inline int SubString::matches(const Regex& r) const{  return r.match(chars(), len, 0) == len;}inline int String::gsub(const String& pat, const String& r){  return _gsub(pat.chars(), pat.length(), r.chars(), r.length());}inline int String::gsub(const SubString&  pat, const String& r){  return _gsub(pat.chars(), pat.length(), r.chars(), r.length());}inline int String::gsub(const Regex& pat, const String& r){  return _gsub(pat, r.chars(), r.length());}inline int String::gsub(const char* pat, const String& r){  return _gsub(pat, -1, r.chars(), r.length());}inline int String::gsub(const char* pat, const char* r){  return _gsub(pat, -1, r, -1);}inline  ostream& operator<<(ostream& s, const String& x){   s << x.chars(); return s;}// a zillion comparison operatorsinline int operator==(const String& x, const String& y){  return compare(x, y) == 0;}inline int operator!=(const String& x, const String& y){  return compare(x, y) != 0;}inline int operator>(const String& x, const String& y){  return compare(x, y) > 0;}inline int operator>=(const String& x, const String& y){  return compare(x, y) >= 0;}inline int operator<(const String& x, const String& y){  return compare(x, y) < 0;}inline int operator<=(const String& x, const String& y){  return compare(x, y) <= 0;}inline int operator==(const String& x, const SubString&  y){  return compare(x, y) == 0;}inline int operator!=(const String& x, const SubString&  y){  return compare(x, y) != 0;}inline int operator>(const String& x, const SubString&  y){  return compare(x, y) > 0;}inline int operator>=(const String& x, const SubString&  y){  return compare(x, y) >= 0;}inline int operator<(const String& x, const SubString&  y){  return compare(x, y) < 0;}inline int operator<=(const String& x, const SubString&  y){  return compare(x, y) <= 0;}inline int operator==(const String& x, const char* t){  return compare(x, t) == 0;}inline int operator!=(const String& x, const char* t){  return compare(x, t) != 0;}inline int operator>(const String& x, const char* t){  return compare(x, t) > 0;}inline int operator>=(const String& x, const char* t){  return compare(x, t) >= 0;}inline int operator<(const String& x, const char* t){  return compare(x, t) < 0;}inline int operator<=(const String& x, const char* t){  return compare(x, t) <= 0;}inline int operator==(const SubString& x, const String& y){  return compare(y, x) == 0;}inline int operator!=(const SubString& x, const String& y){  return compare(y, x) != 0;}inline int operator>(const SubString& x, const String& y){  return compare(y, x) < 0;}inline int operator>=(const SubString& x, const String& y){  return compare(y, x) <= 0;}inline int operator<(const SubString& x, const String& y){  return compare(y, x) > 0;}inline int operator<=(const SubString& x, const String& y){  return compare(y, x) >= 0;}inline int operator==(const SubString& x, const SubString&  y){  return compare(x, y) == 0;}inline int operator!=(const SubString& x, const SubString&  y){  return compare(x, y) != 0;}inline int operator>(const SubString& x, const SubString&  y){  return compare(x, y) > 0;}inline int operator>=(const SubString& x, const SubString&  y){  return compare(x, y) >= 0;}inline int operator<(const SubString& x, const SubString&  y){  return compare(x, y) < 0;}inline int operator<=(const SubString& x, const SubString&  y){  return compare(x, y) <= 0;}inline int operator==(const SubString& x, const char* t){  return compare(x, t) == 0;}inline int operator!=(const SubString& x, const char* t){  return compare(x, t) != 0;}inline int operator>(const SubString& x, const char* t){  return compare(x, t) > 0;}inline int operator>=(const SubString& x, const char* t){  return compare(x, t) >= 0;}inline int operator<(const SubString& x, const char* t){  return compare(x, t) < 0;}inline int operator<=(const SubString& x, const char* t){  return compare(x, t) <= 0;}// a helper needed by at, before, etc.inline SubString String::_substr(int first, int l){  if (first >= length() )  // ??? THIS LINE IS QUESTIONABLE    return SubString(_nilString, 0, 0) ;  else    return SubString(*this, first, l);}//# 26 "../../GctSymbol.h" 2//# 1 "../../../../../../mips/include/Gct/Object/GctHashObject.h" 1// -*- C++ -*-//// GctHashObject class (is abstract)//// Expects to be included by Object.h or where needed explicitly.//// Wendell Baker, Berkeley CAD Group, 1992 (wbaker@ic.Berkeley.EDU)////#pragma interface//# 1 "../../../../../../mips/include/Gct/Object/GctObject.h" 1// -*- C++ -*-//// GctObject class (is abstract)//// Expects to be included by Object.h or where needed explicitly.//// Wendell Baker, Berkeley CAD Group, 1992 (wbaker@ic.Berkeley.EDU)////#pragma interface//# 1 "/sandbox/wbaker/wbaker0/source/mips/include/tostrstream.h" 1// -*- C++ -*-//// tostrstream class//// A terminated oststream - an ostsrstream that auto-terminates on str()//// Wendell Baker, Berkeley CAD Group, 1992 (wbaker@ic.Berkeley.EDU)////#pragma interface//# 1 "/projects/gnu-cygnus/gnu-cygnus-8/common/g++-include/strstream.h" 1//    This is part of the iostream library, providing input/output for C++.//    Copyright (C) 1991 Per Bothner.////    This library is free software; you can redistribute it and/or//    modify it under the terms of the GNU Library General Public//    License as published by the Free Software Foundation; either//    version 2 of the License, or (at your option) any later version.////    This library is distributed in the hope that it will be useful,//    but WITHOUT ANY WARRANTY; without even the implied warranty of//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU//    Library General Public License for more details.////    You should have received a copy of the GNU Library General Public//    License along with this library; if not, write to the Free//    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.//#pragma interface//# 1 "/projects/gnu-cygnus/gnu-cygnus-8/common/g++-include/iostream.h" 1//    This is part of the iostream library, providing -*- C++ -*- input/output.//    Copyright (C) 1991 Per Bothner.////    This library is free software; you can redistribute it and/or//    modify it under the terms of the GNU Library General Public//    License as published by the Free Software Foundation; either//    version 2 of the License, or (at your option) any later version.////    This library is distributed in the hope that it will be useful,//    but WITHOUT ANY WARRANTY; without even the implied warranty of//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU//    Library General Public License for more details.////    You should have received a copy of the GNU Library General Public//    License along with this library; if not, write to the Free//    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.//# 210 "/projects/gnu-cygnus/gnu-cygnus-8/common/g++-include/iostream.h"//# 23 "/projects/gnu-cygnus/gnu-cygnus-8/common/g++-include/strstream.h" 2class strstreambuf : public streambuf {    size_t *lenp; /* current (logical) length (i.e. valid data bytes) */    size_t *sizep; /* allocated (physical) buffer size */    char **bufp;    size_t _len;    size_t _size;    char *buf;    int _frozen;  protected:    virtual int overflow(int = (-1) );  public:    strstreambuf();    strstreambuf(int initial);    strstreambuf(char *ptr, int size, char *pstart = (__null) );    ~strstreambuf();    int frozen() { return _frozen; }    void freeze(int n=1) { _frozen = n != 0; }    size_t pcount();    char *str();};class istrstream : public istream {  public:    istrstream(char*);    istrstream(char*, int);    strstreambuf* rdbuf() { return (strstreambuf*)_strbuf; }};class ostrstream : public ostream {  public:    ostrstream();    ostrstream(char *cp, int n, int mode=ios::out);    size_t pcount() { return ((strstreambuf*)_strbuf)->pcount(); }    char *str() { return ((strstreambuf*)_strbuf)->str(); }    void freeze(int n = 1) { ((strstreambuf*)_strbuf)->freeze(n); }    int frozen() { return ((strstreambuf*)_strbuf)->frozen(); }    strstreambuf* rdbuf() { return (strstreambuf*)_strbuf; }};//# 25 "/sandbox/wbaker/wbaker0/source/mips/include/tostrstream.h" 2//// tostrstream class//// An isteam class that doesn't have that nasty skipws parameter that// you have to remember to set.  This class simply provides the istream// functionality with a set of constructors which defaults skipws to// FALSE (instead of defaulting to T

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -