#include "utils.h" void memcpy(u8 *dst, u8 *src, u32 size){ for(u32 i=0;i0){dividend-=divisor;} return dividend; } int strlen(char * cp) { int len=0; while( cp[len++]) ; return len - 1 ; //because it counted the zero which we don't want. } int wordlen(char *s) { int len=0; while( *s!='\n' && *s!='\0' && *s!=' '){ s++; } return len - 1 ; //because it counted the zero which we don't want. } u8 strcmp(char *str1, char*str2){ while( *str1!='\0' && *str2!='\0'){ if(*str1!=*str2) return 1; str1++; str2++; } return *str1 == *str2; // Ensure both final char are \0 } u8 strncmp(char *str1, char *str2, int n){ for(int i=0;i