mirror of
https://github.com/Kaehvaman/OAIP.git
synced 2025-01-18 08:39:11 +04:00
changed strchr_my_arr & strchr_my_ptr
This commit is contained in:
parent
a27f27d6f6
commit
4d01a02712
@ -68,7 +68,7 @@ char* strcat_my_ptr(char* destination, const char* source) {
|
||||
return destination;
|
||||
}
|
||||
|
||||
char* strchr_my_arr(const char str[], int ch) {
|
||||
char* strchr_my_arr(char str[], int ch) {
|
||||
int i = 0;
|
||||
while (str[i] != '\0') {
|
||||
if (str[i] == (char)ch) {
|
||||
@ -79,7 +79,7 @@ char* strchr_my_arr(const char str[], int ch) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char* strchr_my_ptr(const char* str, int ch) {
|
||||
char* strchr_my_ptr(char* str, int ch) {
|
||||
while (*str != '\0') {
|
||||
if (*str == (char)ch) {
|
||||
return str;
|
||||
|
Loading…
Reference in New Issue
Block a user