WKern
Loading...
Searching...
No Matches
util.h
Go to the documentation of this file.
1/*
2WKern - A Bare Metal OS / Kernel I am making (For Fun)
3Copyright (C) 2025 Wdboyes13
4
5This program is free software: you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation, either version 3 of the License, or
8any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program. If not, see <https://www.gnu.org/licenses/>.
17*/
18
19#pragma once
20
21#include <types/nums.h>
22
23int Kstrcmp(const char *a, const char *b);
24void Kshcmp();
25char *Kstrchr(const char *str, int c);
26int Ktolower(int c);
27int Kisdigit(int c);
28int Kisspace(int c);
29int Kisxdigit(int c);
30size_t Kstrlen(const char *str);
31int Split(char *input, char **argv, int max_args);
32
33void ZZZ(int ms);
34
35int Katoi(const char *str);
36int KatoiAuto(const char *str);
37void Kitoa(unsigned int num, char *buf);
38
39void DrawSmile();
40
41u32 Kmstrlen(const char *str);
unsigned int u32
32-Bit Unsigned Int
Definition nums.h:30
int Kisspace(int c)
Check if character is whitespace.
Definition strings.c:107
int Split(char *input, char **argv, int max_args)
Split into ARGC.
Definition strings.c:146
int Katoi(const char *str)
Converts ASCII - Integer.
Definition numtools.c:23
char * Kstrchr(const char *str, int c)
Search for character in string.
Definition strings.c:74
void Kshcmp()
Interactive string comparison.
Definition strings.c:38
int Ktolower(int c)
Convert character to lowercase.
Definition strings.c:92
u32 Kmstrlen(const char *str)
Get string length.
Definition strings.c:60
int Kisxdigit(int c)
Checks if input is a Hexadecimal Diget.
Definition strings.c:134
int Kisdigit(int c)
Definition strings.c:100
void DrawSmile()
int Kstrcmp(const char *a, const char *b)
Compare Strings - Similar to standard libc strcmp.
Definition strings.c:27
void ZZZ(int ms)
Sleeps for 10ms.
Definition ksleep.c:25
void Kitoa(unsigned int num, char *buf)
Convert Integer to ASCII Text.
Definition numtools.c:73
int KatoiAuto(const char *str)
size_t Kstrlen(const char *str)
Get string length.
Definition strings.c:121