Загрузка данных


#ifndef S21_STRING_H
#define S21_STRING_H

#include <stddef.h>

size_t s21_strlen(const char *str);

#endif


Pipio


#include "s21_string.h"

size_t s21_strlen(const char *str) {
    size_t length = 0;

    if (str != NULL) {
        while (str[length] != '\0') {
            length++;
        }
    }

    return length;
}