WKern
Loading...
Searching...
No Matches
strings.c File Reference
#include <global.h>
#include <io/kio.h>
#include <utils/util.h>

Go to the source code of this file.

Functions

int Kstrcmp (const char *a, const char *b)
 Compare Strings - Similar to standard libc strcmp.
void Kshcmp ()
 Interactive string comparison.
u32 Kmstrlen (const char *str)
 Get string length.
char * Kstrchr (const char *str, int c)
 Search for character in string.
int Ktolower (int c)
 Convert character to lowercase.
int Kisdigit (int c)
int Kisspace (int c)
 Check if character is whitespace.
size_t Kstrlen (const char *str)
 Get string length.
int Kisxdigit (int c)
 Checks if input is a Hexadecimal Diget.
int Split (char *input, char **argv, int max_args)
 Split into ARGC.

Function Documentation

◆ Kisdigit()

int Kisdigit ( int c)

Definition at line 100 of file strings.c.

◆ Kisspace()

int Kisspace ( int c)

Check if character is whitespace.

Parameters
c- Character to check
Returns
1 if whitespace, 0 if not

Definition at line 107 of file strings.c.

◆ Kisxdigit()

int Kisxdigit ( int c)

Checks if input is a Hexadecimal Diget.

Parameters
Characterto check
Returns
1 if is hex digit, 0 if not

Definition at line 134 of file strings.c.

◆ Kmstrlen()

u32 Kmstrlen ( const char * str)

Get string length.

Parameters
str- String to check length
Returns
uint32_t (u32) - Length of passed string

Definition at line 60 of file strings.c.

◆ Kshcmp()

void Kshcmp ( )

Interactive string comparison.

Definition at line 38 of file strings.c.

◆ Kstrchr()

char * Kstrchr ( const char * str,
int c )

Search for character in string.

Parameters
Stringto search
Characterto find
Returns
Pointer to character if found, if not found NULL

Definition at line 74 of file strings.c.

◆ Kstrcmp()

int Kstrcmp ( const char * a,
const char * b )

Compare Strings - Similar to standard libc strcmp.

Parameters
a- First string to compare
b- Second string to compare
Returns
Integer - 0 if match

Definition at line 27 of file strings.c.

◆ Kstrlen()

size_t Kstrlen ( const char * str)

Get string length.

Parameters
str- String to check length
Returns
uint32_t (u32) - Length of passed string

Definition at line 121 of file strings.c.

◆ Ktolower()

int Ktolower ( int c)

Convert character to lowercase.

Parameters
Characterto convert
Returns
Lowercase character

Definition at line 92 of file strings.c.

◆ Split()

int Split ( char * input,
char ** argv,
int max_args )

Split into ARGC.

Parameters
char*- Input String
char**- Argv Buffer
-Max args
Returns
Arguement number (argc)

Definition at line 146 of file strings.c.