34 if (
chars !=
nullptr) {
57 this->
chars = (
char*)alt;
80 virtual void set(
const char c) {
85 virtual void set(
int value) {
126 virtual void add(
int value) {
156 virtual void add(
const char c) {
166 if (str ==
nullptr)
return isEmpty();
172 if (str ==
nullptr)
return false;
179 if (str ==
nullptr)
return false;
186 if (str ==
nullptr)
return false;
202 if (*pattern == *
line) {
261 for (
int j = start;
j <
len;
j++) {
272 for (
int j=0;
j < n;
j++){
274 if (result < 0)
break;
285 if (
chars ==
nullptr ||
cont ==
nullptr)
return -1;
287 for (
int j = start;
j <
len;
j++) {
298 if (
cont ==
nullptr)
return -1;
311 for (
int j=0;
j < n;
j++){
313 if (result < 0)
break;
359 if (this->
len != alt.
len)
return false;
479 int len = end - start;
481 if (this->
chars !=
nullptr) {
491 virtual void substring(
const char* from,
int start,
int end) {
493 int len = end - start;
495 if (this->
chars !=
nullptr) {
505 if (
chars ==
nullptr)
return;
522 if (
chars ==
nullptr)
return;
523 int n =
count(
' ', 0);
524 if (n > 0) *
this << n;
529 if (
chars ==
nullptr)
return;
553 virtual void insert(
int pos,
const char* str) {
569 for (
int j = 0;
j <
len;
j++) {
619 if (
chars !=
nullptr) {
620 for (
int j = 0;
j <
len;
j++) {
628 if (
chars !=
nullptr) {
629 for (
int j = 0;
j <
len;
j++) {
636 static const char*
toBinary(
void const*
const ptr,
size_t const size) {
637 static char result[160];
638 unsigned char*
b = (
unsigned char*)ptr;
642 for (i = size - 1; i >= 0; i--) {
643 for (
j = 7;
j >= 0;
j--) {
644 byte = (
b[i] >>
j) & 1;
645 result[idx++] =
byte ?
'1' :
'0';
653 for (
int j = 0;
j <
len;
j++) {
665 for (
int j = 0;
j <
len;
j++) {
689 for (
int j = pos + 1;
j <
len;
j++) {
705 for (
int j = 0;
j <
len;
j++) {
742 static char*
itoa(
int n,
char s[]) {
748 s[i++] = n % 10 +
'0';
749 }
while ((n /= 10) > 0);
750 if (
sign < 0)
s[i++] =
'-';
760 for (i = 0,
j =
strlen(
s) - 1; i <
j; i++,
j--) {
774 unsigned long mult = 1;
794 unsigned long mult = 1;
804 while (
frac1 /= 10) padding--;
816 for (i = 0; i <
J; i++) {
828 static int strncmp_i(
const char* s1,
const char* s2,
int n) {
829 if (n == 0)
return (0);
832 return (*(
unsigned char*)s1 - *(
unsigned char*)--s2);
833 if (*s1++ == 0)
break;