2 * captive_reactos_str*() for reactos wrappers of libcaptive
3 * Copyright (C) 2003 Jan Kratochvil <project-captive@jankratochvil.net>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; exactly version 2 of June 1991 is required
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "reactos/ntos/rtl.h" /* self */
23 #include <glib/gmessages.h>
28 * captive_reactos_strchr:
29 * @s: 0-terminated string to search @c in.
30 * %NULL value is forbidden.
31 * @c: #guint8 byte to search for in @s.
33 * Simple wrapper around system strchr() to prevent possible declaration conflicts.
35 * Returns: Pointer to the found @c in @s or %NULL if not found.
37 char *captive_reactos_strchr(const char *s, int c)
39 g_return_val_if_fail(s!=NULL,NULL);
46 * captive_reactos_strcmp:
47 * @s1: 0-terminated first string to compare.
48 * %NULL value is forbidden.
49 * @s2: 0-terminated second string to compare.
50 * %NULL value is forbidden.
52 * Simple wrapper around system strcmp() to prevent possible declaration conflicts.
54 * Returns: integer less than, equal to, or greater than zero if @s1 (or the
55 * first n bytes thereof) is found, respectively, to be less than, to match, or
56 * be greater than @s2.
58 int captive_reactos_strcmp(const char *s1, const char *s2)
60 g_return_val_if_fail(s1!=NULL,0);
61 g_return_val_if_fail(s2!=NULL,0);
68 * captive_reactos_strcpy:
69 * @to: Target memory to copy @from to.
70 * %NULL value is forbidden.
71 * @s2: 0-terminated string to copy to @to.
72 * %NULL value is forbidden.
74 * Simple wrapper around system strcpy() to prevent possible declaration conflicts.
76 * Returns: The same pointer @to as received.
78 char *captive_reactos_strcpy(char *to, const char *from)
82 g_return_val_if_fail(to!=NULL,NULL);
83 g_return_val_if_fail(from!=NULL,NULL);
93 * captive_reactos_strlen:
94 * @str: 0-terminated string to measure its length.
95 * %NULL value is forbidden.
97 * Simple wrapper around system strlen() to prevent possible declaration conflicts.
99 * Returns: Number of characters in @str.
101 size_t captive_reactos_strlen(const char *str)
103 g_return_val_if_fail(str!=NULL,0);