My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sw_string_functions.h
Go to the documentation of this file.
1 /*
2  * OpenVirtualization:
3  * For additional details and support contact developer@sierraware.com.
4  * Additional documentation can be found at www.openvirtualization.org
5  *
6  * Copyright (C) 2010-2014 SierraWare
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21  *
22  */
23 /*
24  * Header for String manipulation routines
25  *
26  */
27 
28 #ifndef __LIB__STRING_FUNCTIONS_H__
29 #define __LIB__STRING_FUNCTIONS_H__
30 
31 #include <sw_types.h>
32 #include <sw_common_types.h>
42 int sw_strncmp(char * str1, char * str2, int n);
43 
52 int sw_strcmp (const char * s1, const char * s2);
53 
62 char *sw_strchr(const char *s, int c);
63 
71 u32 sw_strtoi(char * str);
72 
80 u32 sw_strlen(char * s);
81 
90 char * sw_strcpy(char * dest, char *src);
91 
102 char *sw_strncpy(char *dest, char *src, size_t n);
103 
112 char * sw_strcat(char * dest, const char *src);
113 
123 char * sw_strncat(char * dest, const char *src, size_t n);
124 
135 char *sw_strncpy(char *dest, char *src, size_t n);
136 
146 u32 sw_sprintf(char *print_buffer, const char *fmt, ...);
147 
162 char * sw_maxstrncpy(char * dest, char *src, size_t n,size_t destLen,
163  size_t srcLen);
164 
165 #endif
char * sw_strncpy(char *dest, char *src, size_t n)
strcpy - Copy a NULL terminated string
Definition: sw_string_functions.c:135
int sw_strcmp(const char *s1, const char *s2)
strcmp - compare strings
Definition: sw_string_functions.c:163
char * sw_strncat(char *dest, const char *src, size_t n)
Definition: sw_string_functions.c:198
char * sw_strcat(char *dest, const char *src)
Definition: sw_string_functions.c:179
u32 sw_strlen(char *s)
strlen - Find the length of a string
Definition: sw_string_functions.c:94
u32 sw_sprintf(char *print_buffer, const char *fmt,...)
Definition: sw_string_functions.c:247
char * sw_strcpy(char *dest, char *src)
strcpy - Copy a NULL terminated string
Definition: sw_string_functions.c:114
char * sw_strchr(const char *s, int c)
Definition: sw_string_functions.c:224
int sw_strncmp(char *str1, char *str2, int n)
Definition: sw_string_functions.c:38
u32 sw_strtoi(char *str)
Definition: sw_string_functions.c:59
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...
Definition: sw_string_functions.c:273