Nigel
0f0fc9f252
Moved the PMM away from being object orientated as it is just plain annoying renamed src folder to source Set timeout to 5 seconds in the grub config
28 lines
402 B
C
28 lines
402 B
C
#include "string.h"
|
|
|
|
size_t strlen(const char* str) {
|
|
size_t len = 0;
|
|
while(str[len]){
|
|
len++;
|
|
}
|
|
return len;
|
|
}
|
|
|
|
|
|
|
|
int strncmp ( const char* str1, const char* str2, size_t num ){
|
|
for( int i = 0; i < num ; i++){
|
|
|
|
if( str1[i] < str2[i]){
|
|
return -1;
|
|
}
|
|
|
|
if( str1[i] > str2[i] ){
|
|
return 1;
|
|
}
|
|
|
|
|
|
}
|
|
|
|
return 0;
|
|
} |