CapString

Files CCore/inc/CapString.h CCore/src/CapString.cpp

CapString is a simple helper class. It copies the given string to the internal buffer, caps the string if neccessary and makes it zero-terminated. The template parameter is the cap length.


template <ulen MaxLen=TextBufLen>
class CapString : NoCopy
 {
   char buf[MaxLen+1];
   
  public:
   
   explicit CapString(StrLen str);
   
   operator const char * () const { return buf; }
 };