ders::ch_rng Struct Reference

Represents character range. More...

#include <text.hpp>

List of all members.

Public Member Functions

 ch_rng (const char *str)
 ch_rng (const char *b, const char *e)
 ch_rng (const text &t)
 ch_rng (const sh_text &sht)
int size () const

Public Attributes

const char * beg
const char * end


Detailed Description

Represents character range.

Definition at line 47 of file text.hpp.


Constructor & Destructor Documentation

ders::ch_rng::ch_rng ( const char *  str  ) 

Definition at line 47 of file text.cpp.

00048 {
00049  assert(str!=0);
00050  beg=str;
00051  end=str+strlen(str);
00052 }

ders::ch_rng::ch_rng ( const char *  b,
const char *  e 
) [inline]

Definition at line 151 of file text.hpp.

00151                                                   : beg(b), end(e)
00152 { assert(beg!=0 && beg<=end || beg==0 && end==0); }

ders::ch_rng::ch_rng ( const text t  )  [inline]

Definition at line 154 of file text.hpp.

00154                                    : beg(t.begin()), end(t.end())
00155 { assert(beg!=0 && beg<=end); }

ders::ch_rng::ch_rng ( const sh_text sht  )  [inline]

Definition at line 157 of file text.hpp.

00157                                         : beg(sht->begin()), end(sht->end())
00158 { assert(beg!=0 && beg<=end); }


Member Function Documentation

int ders::ch_rng::size (  )  const [inline]

Definition at line 56 of file text.hpp.

00056 { return end-beg; }


Member Data Documentation

const char* ders::ch_rng::beg

Definition at line 48 of file text.hpp.

const char* ders::ch_rng::end

Definition at line 49 of file text.hpp.


The documentation for this struct was generated from the following files:

Generated on Tue Dec 8 11:35:33 2009 for derslib by  doxygen 1.5.5