My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
sw_string_functions.c File Reference
#include <sw_debug.h>
#include <sw_string_functions.h>

Functions

int sw_strncmp (char *str1, char *str2, int n)
 
u32 sw_strtoi (char *str)
 
u32 sw_strlen (char *s)
 strlen - Find the length of a string More...
 
char * sw_strcpy (char *dest, char *src)
 strcpy - Copy a NULL terminated string More...
 
char * sw_strncpy (char *dest, char *src, size_t n)
 strcpy - Copy a NULL terminated string More...
 
int sw_strcmp (const char *s1, const char *s2)
 strcmp - compare strings More...
 
char * sw_strcat (char *dest, const char *src)
 
char * sw_strncat (char *dest, const char *src, size_t n)
 
char * sw_strchr (const char *s, int c)
 
u32 sw_sprintf (char *print_buffer, const char *fmt,...)
 
char * sw_maxstrncpy (char *dest, char *src, size_t n, size_t destLen, size_t srcLen)
 Copies the first num characters of source to destination upto Null Terminate String Found. More...
 

Function Documentation

char* sw_maxstrncpy ( char *  dest,
char *  src,
size_t  n,
size_t  destLen,
size_t  srcLen 
)

Copies the first num characters of source to destination upto Null Terminate String Found.

Parameters
dest- Pointer to the destination array where the content is to be copied
src- string to be copied
n- number of characters to be copied from source
destLen- destination Maximum Length
srcLen- source Maximum Length
Returns
u32 sw_sprintf ( char *  print_buffer,
const char *  fmt,
  ... 
)
Parameters
print_buffer
fmt
...
Returns
char* sw_strcat ( char *  dest,
const char *  src 
)
Parameters
dest
src
Returns
char* sw_strchr ( const char *  s,
int  c 
)
Parameters
s
c
Returns
int sw_strcmp ( const char *  s1,
const char *  s2 
)

strcmp - compare strings

Parameters
s1
s2
Returns
char* sw_strcpy ( char *  dest,
char *  src 
)

strcpy - Copy a NULL terminated string

Parameters
dest
src
Returns
u32 sw_strlen ( char *  s)

strlen - Find the length of a string

Parameters
s
Returns
char* sw_strncat ( char *  dest,
const char *  src,
size_t  n 
)
Parameters
dest
src
n
Returns
int sw_strncmp ( char *  str1,
char *  str2,
int  n 
)
Parameters
str1
str2
n
Returns
char* sw_strncpy ( char *  dest,
char *  src,
size_t  n 
)

strcpy - Copy a NULL terminated string

Parameters
dest
src
n
Returns
u32 sw_strtoi ( char *  str)
Parameters
str
Returns