Skip to content
Snippets Groups Projects
Commit 3428b865 authored by Никита Кожуро's avatar Никита Кожуро :panda_face:
Browse files

Initial commit

parents
Branches master
No related tags found
No related merge requests found
#ifndef CUSTOM_STRING_C
#define CUSTOM_STRING_C
#include "custom_string.h"
rfInt rf_strcmp(const char* string1, const char* string2 )
{
for (rfUint32 i = 0; ; i++)
{
if (string1[i] == '\0')
{
return 0;
}
if (string1[i] != string2[i])
{
return string1[i] < string2[i] ? -1 : 1;
}
}
}
rfSize rf_strlen(const char *s) {
rfSize i;
for (i = 0; s[i] != '\0'; i++);
return i;
}
#endif // CUSTOM_STRING_C
#ifndef CUSTOM_STRING_H
#define CUSTOM_STRING_H
#include "rf60X_types.h"
rfInt rf_strcmp(const rfChar* string1, const rfChar* string2 );
rfSize rf_strlen(const rfChar *s);
#endif // CUSTOM_STRING_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment