mirror of https://github.com/E-Almqvist/eOS
parent
e429ac6102
commit
4d6c6fd8dd
@ -0,0 +1,21 @@ |
||||
#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++ ) { |
||||
|
||||
} |
||||
} |
@ -0,0 +1,2 @@ |
||||
unsigned int strlen(char* str); |
||||
char* strcat(char* buf, char* str); |
@ -1 +1 @@ |
||||
char* int_to_str(int i); |
||||
char* int_to_str(int i, char* strbuf); |
||||
|
Loading…
Reference in new issue