29 #define MAX_SHORTSTRING_LENGTH 256
30 #define INVALID_INDEX -1
47 char GetChar(
const int Index)
const;
50 void SetChar(
const int Index,
const char Value);
87 void Fill(
const char AChar);
88 void Print(std::ostream& out);
93 CString(
const std::string& AString);
126 void Print(std::ostream& out);
138 #define CHARSET_SIZE (1<<(8*sizeof(char)))
149 bool Isset(
const char AChar)
const;
150 char GetChar(
const char AChar)
const;
151 void SetChar(
const char AChar);
155 void Print(std::ostream& out);
178 virtual bool Match(
const CString& Pattern,
const bool Move =
false);
179 virtual void Print(std::ostream& out) {};
196 virtual char&
First(
void);
197 virtual char&
Prev(
void);
198 virtual char&
This(
void);
199 virtual char&
Next(
void);
200 virtual char&
Last(
void);
201 virtual void Reset(
void);
202 virtual bool Match(
const CString& Pattern,
const bool Move =
false);
221 virtual char&
First(
void);
222 virtual char&
Prev(
void);
223 virtual char&
This(
void);
224 virtual char&
Next(
void);
225 virtual char&
Last(
void);
226 virtual void Reset(
void);
227 virtual bool Match(
const CString& Pattern,
const bool Move =
false);
251 void Insert(
const char AChar);
254 void Remove(
const char AChar);
261 unsigned int GetAt(
const char AChar)
const;
262 void SetAt(
const char AChar,
const unsigned int Frequency);
264 void Print(std::ostream& out);
289 {
CString result(AString); result+=BString;
return result; }
292 {
CString result(AString); result+=BChar;
return result; }
295 {
CString result(AChar); result+=BString;
return result; }
298 {
CString result(AString); result+=BInteger;
return result; }
301 {
CString result; result+=AInteger; result+=BString;
return result; }
304 {
CString result(AString); result+=BFloat;
return result; }
307 {
CString result; result+=AFloat; result+=BString;
return result; }
310 {
CString result(AString); result+=BFloat;
return result; }
313 {
CString result; result+=AFloat; result+=BString;
return result; }
316 {
CString result(AString); result+=BCString;
return result; }
319 {
CString result(AString); result+=BString;
return result; }
339 for (
int i = 0, n = AString.
GetLength(); i < n; i++)
342 result[i] = islower(c) ? toupper(c) : c;
350 for (
int i = 0, n = AString.
GetLength(); i < n; i++)
353 result[i] = isupper(c) ? tolower(c) : c;
358 inline char hexChar(
const unsigned char Value)
363 inline char HexChar(
const unsigned char Value)
368 inline CString hex(
const unsigned int AInteger,
const unsigned int Length=8)
371 unsigned int value = AInteger;
372 for (
unsigned int i = 0, j = Length; i < Length; i++)
380 inline CString Hex(
const unsigned int AInteger,
const unsigned int Length=8)
383 unsigned int value = AInteger;
384 for (
unsigned int i = 0, j = Length; i < Length; i++)
394 return hex(AInteger,2*
sizeof(
unsigned char));
399 return Hex(AInteger,2*
sizeof(
unsigned char));
404 return hex(AInteger,2*
sizeof(
unsigned short int));
409 return Hex(AInteger,2*
sizeof(
unsigned short int));
414 return hex(AInteger,2*
sizeof(
unsigned int));
419 return Hex(AInteger,2*
sizeof(
unsigned int));
422 inline CString hex64(
const long long int AInteger,
const unsigned int Length=16)
425 long long int value = AInteger;
426 for (
unsigned int i = 0, j = Length; i < Length; i++)
434 inline CString Hex64(
const long long int AInteger,
const unsigned int Length=16)
437 long long int value = AInteger;
438 for (
unsigned int i = 0, j = Length; i < Length; i++)
446 inline CString hex(
const unsigned char *Buffer,
const unsigned int Length=0)
448 unsigned int length = Length*2;
450 for (
unsigned int i = 0, j = length; i < Length; i++)
458 inline CString Hex(
const unsigned char *Buffer,
const unsigned int Length=0)
460 unsigned int length = Length*2;
462 for (
unsigned int i = 0, j = length; i < Length; i++)
473 const CString& Suffix,
const unsigned int Length);
482 const CCharset& InvalidChars,
const bool ValidateUndefined);
499 const char ReplaceChar);
505 long long int& UnitSize,
char& UnitChar);
508 CString& Guessed,
const bool TryFuzzy =
false);
510 const bool TryFuzzy =
false);