/[pcre]/code/trunk/pcre_stringpiece.h.in
ViewVC logotype

Diff of /code/trunk/pcre_stringpiece.h.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 96 by nigel, Fri Mar 2 13:10:43 2007 UTC revision 256 by ph10, Wed Sep 19 08:57:53 2007 UTC
# Line 50  Line 50 
50  #include <bits/type_traits.h>  #include <bits/type_traits.h>
51  #endif  #endif
52    
53    #include <pcre.h>
54    
55  using std::string;  using std::string;
56    
57  namespace pcrecpp {  namespace pcrecpp {
58    
59  class StringPiece {  class PCRECPP_EXP_DEFN StringPiece {
60   private:   private:
61    const char*   ptr_;    const char*   ptr_;
62    int           length_;    int           length_;
# Line 66  class StringPiece { Line 68  class StringPiece {
68    StringPiece()    StringPiece()
69      : ptr_(NULL), length_(0) { }      : ptr_(NULL), length_(0) { }
70    StringPiece(const char* str)    StringPiece(const char* str)
71      : ptr_(str), length_(static_cast<int>(strlen(str))) { }      : ptr_(str), length_(static_cast<int>(strlen(ptr_))) { }
72      StringPiece(const unsigned char* str)
73        : ptr_(reinterpret_cast<const char*>(str)),
74          length_(static_cast<int>(strlen(ptr_))) { }
75    StringPiece(const string& str)    StringPiece(const string& str)
76      : ptr_(str.data()), length_(static_cast<int>(str.size())) { }      : ptr_(str.data()), length_(static_cast<int>(str.size())) { }
77    StringPiece(const char* offset, int len)    StringPiece(const char* offset, int len)

Legend:
Removed from v.96  
changed lines
  Added in v.256

  ViewVC Help
Powered by ViewVC 1.1.5