XenevaOS
Loading...
Searching...
No Matches
Macros | Typedefs | Functions
string.c File Reference
#include <stdint.h>
#include <_null.h>
Include dependency graph for string.c:

Macros

#define MAX_STRING_LENGTH   4095
 
#define WS   (sizeof(WT))
 

Typedefs

typedef size_t WT
 

Functions

void memset (void *targ, int val, uint32_t len)
 
int memcmp (const void *first, const void *second, size_t length)
 
void memcpy (void *__restrict dest, void *__restrict src, size_t len)
 
int strcmp (const char *str1, const char *str2)
 
char * strcpy (char *__restrict s1, const char *__restrict s2)
 
size_t strlen (const char *s)
 
int strncmp (const char *s1, const char *s2, size_t n)
 
char * strncpy (char *destString, const char *sourceString, size_t maxLength)
 
char * strchr (char *str, int character)
 locates first occurance of character in string
 
char * strcat (char *destString, const char *sourceString)
 
char * strncat (char *destString, const char *sourceString, size_t maxLength)
 
char * strdup (const char *c)
 
char * strstr (const char *s1, const char *s2)
 

Macro Definition Documentation

◆ MAX_STRING_LENGTH

#define MAX_STRING_LENGTH   4095

◆ WS

#define WS   (sizeof(WT))

Typedef Documentation

◆ WT

typedef size_t WT

Function Documentation

◆ memcmp()

int memcmp ( const void *  first,
const void *  second,
size_t  length 
)

◆ memcpy()

void memcpy ( void *__restrict  dest,
void *__restrict  src,
size_t  len 
)

◆ memset()

void memset ( void *  targ,
int  val,
uint32_t  len 
)

◆ strcat()

char * strcat ( char *  destString,
const char *  sourceString 
)

◆ strchr()

char * strchr ( char *  str,
int  character 
)

locates first occurance of character in string

◆ strcmp()

int strcmp ( const char *  str1,
const char *  str2 
)

BSD 2-Clause License

Copyright (c) 2022, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

◆ strcpy()

char * strcpy ( char *__restrict  s1,
const char *__restrict  s2 
)

◆ strdup()

char * strdup ( const char *  c)

◆ strlen()

size_t strlen ( const char *  s)

◆ strncat()

char * strncat ( char *  destString,
const char *  sourceString,
size_t  maxLength 
)

◆ strncmp()

int strncmp ( const char *  s1,
const char *  s2,
size_t  n 
)

◆ strncpy()

char * strncpy ( char *  destString,
const char *  sourceString,
size_t  maxLength 
)

◆ strstr()

char * strstr ( const char *  s1,
const char *  s2 
)