MOS Source Code
Loading...
Searching...
No Matches
mos_string.c File Reference
#include "mos_string.h"
#include <mos/moslib_global.h>
#include <mos_stdlib.h>
+ Include dependency graph for mos_string.c:

Go to the source code of this file.

Macros

#define UNALIGNED(X, Y)
 
#define BIGBLOCKSIZE   (sizeof(long) << 2)
 
#define LITTLEBLOCKSIZE   (sizeof(long))
 
#define TOO_SMALL(LEN)
 

Functions

size_t strlen (const char *str)
 
size_t strnlen (const char *str, size_t n)
 
s32 strcmp (const char *s1, const char *s2)
 
s32 strncmp (const char *str1, const char *str2, size_t n)
 
s32 strncasecmp (const char *a, const char *b, size_t n)
 
voidmemcpy (void *__restrict _dst, const void *__restrict _src, size_t n)
 
voidmemmove (void *dest, const void *source, size_t length)
 
voidmemset (void *s, int c, size_t n)
 
int memcmp (const void *s1, const void *s2, size_t n)
 
void memzero (void *s, size_t n)
 
voidmemchr (const void *m, int c, size_t n)
 
char * strcpy (char *__restrict dest, const char *__restrict src)
 
char * strcat (char *__restrict dest, const char *__restrict src)
 
char * strncpy (char *__restrict dest, const char *__restrict src, size_t n)
 
char * strchr (const char *s, int c)
 
char * strrchr (const char *s, int c)
 
size_t strspn (const char *s, const char *accept)
 
char * strpbrk (const char *s, const char *accept)
 
char * strtok (char *str, const char *delim)
 
char * strtok_r (char *str, const char *delim, char **saveptr)
 

Macro Definition Documentation

◆ UNALIGNED

#define UNALIGNED ( X,
Y )
Value:
(((long) X & (sizeof(long) - 1)) | ((long) Y & (sizeof(long) - 1)))

Referenced by memcpy().

◆ BIGBLOCKSIZE

#define BIGBLOCKSIZE   (sizeof(long) << 2)

Referenced by memcpy().

◆ LITTLEBLOCKSIZE

#define LITTLEBLOCKSIZE   (sizeof(long))

Referenced by memcpy().

◆ TOO_SMALL

#define TOO_SMALL ( LEN)
Value:
((LEN) < BIGBLOCKSIZE)
#define BIGBLOCKSIZE

Referenced by memcpy().