__ksize kputs(const char* str) { __ksize i; for (i=0; i<strlen(str); ++i) kputch(str[i]); return i; }
void kputs_dec(uint32_t n) { if (n == 0) { kputch('0'); return; } unsigned short acc = n; char c[32]; int i = 0; while (acc > 0) { c[i] = '0' + acc % 10; acc /= 10; i++; } c[i] = 0; char c2[32]; c2[i--] = 0; int j = 0; while (i >= 0) { c2[i--] = c[j++]; } kputs(c2); }
/** * Prints a string to the screen * * Uses kputc for this. * * @param text Pointer to the screen should been printed **/ void kputs(const char *text) { int i; for (i = 0; i < strlen(text); i++) { kputch(text[i]); } }
void kputs(const __ks8* s) { while (*s) kputch(*s++); }
void kputs(char *s) { while (*s) { kputch(*s++); } }