mirror of https://github.com/E-Almqvist/eOS
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
428 B
21 lines
428 B
#include "str.h"
|
|
|
|
unsigned int strlen(char* str) {
|
|
char* c;
|
|
for( c = str; *c != '\0'; c++ ) // search for end-of-string
|
|
|
|
return (unsigned int)(c - str); // get size by delta-address
|
|
|
|
}
|
|
|
|
char* strcat(char* buf, char* str) {
|
|
unsigned int bufferlen = strlen(buf);
|
|
|
|
// remove the 0x0 char from the buffer
|
|
*(buf + bufferlen) = 0x3f; // placeholder
|
|
|
|
// concat the str to buf
|
|
for( char* c = str; *c != '\0'; c++ ) {
|
|
|
|
}
|
|
}
|
|
|