CyberEngineMkIII
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CStyleString.hpp
Go to the documentation of this file.
1 #pragma once
3 namespace CYB {
4  namespace API {
5  namespace String {
7  class CStyle {
8  protected:
9  char* FData;
10  int FLength;
11  protected:
19  CStyle(char* const AData, const int ALength) noexcept;
20  virtual ~CStyle() = default;
27  int CalculateByteLength(void) const noexcept;
28  public:
35  const char* CString(void) const noexcept;
42  virtual int Length(void) const noexcept = 0;
49  int RawLength(void) const noexcept;
50 
59  int IndexOfByte(const byte AByte, int ASkip = 0) const noexcept;
60 
68  bool operator==(const CStyle& ARHS) const noexcept;
76  bool operator!=(const CStyle& ARHS) const noexcept;
77 
82  operator const char*(void) const noexcept;
83  };
84  };
85  };
86 };
87 #include "CStyleString.inl"
unsigned char byte
It's a byte, 8 bits, etc...
Definition: Types.hpp:4
int RawLength(void) const noexcept
Get the byte length of the contained CString.
virtual int Length(void) const noexcept=0
Get the number of characters in the contained string. The definition of character may change in deriv...
char * FData
String data. May be const, do not modify from this class.
Definition: CStyleString.hpp:9
int FLength
Number of bytes before null terminator in FData.
int CalculateByteLength(void) const noexcept
Calculate the byte length of the contained CString.
A basic char contained string.
Definition: CStyleString.hpp:7
int IndexOfByte(const byte AByte, int ASkip=0) const noexcept
Get the ASkip'th index of byte AByte in the string.
const char * CString(void) const noexcept
Get the contained const CString.
CStyle(char *const AData, const int ALength) noexcept
Construct a CStyle string.