Compare commits
2 Commits
b1c99ee760
...
fd74235421
Author | SHA1 | Date | |
---|---|---|---|
fd74235421 | |||
0f9b5259b3 |
Binary file not shown.
@ -46,7 +46,7 @@ void deshifr (char *text) {
|
|||||||
text[i] = tolower(text[i]);
|
text[i] = tolower(text[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
s
|
||||||
int search_string (const char* heap_orig, const char* needle_orig) {
|
int search_string (const char* heap_orig, const char* needle_orig) {
|
||||||
char heap[LINESIZE];
|
char heap[LINESIZE];
|
||||||
char needle[LINESIZE];
|
char needle[LINESIZE];
|
||||||
@ -58,13 +58,13 @@ int search_string (const char* heap_orig, const char* needle_orig) {
|
|||||||
int needle_len = strlen(needle);
|
int needle_len = strlen(needle);
|
||||||
|
|
||||||
for (int i = 0; i <= heap_len - needle_len; i++) {
|
for (int i = 0; i <= heap_len - needle_len; i++) {
|
||||||
int j;
|
int o;
|
||||||
for (j = 0; j < needle_len; j++) {
|
for (o = 0; o < needle_len; o++) {
|
||||||
if (heap[i+j] != needle[j]) {
|
if (heap[i+o] != needle[o]) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (j == needle_len) {
|
if (o == needle_len) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user