--- str_basic.c 2002/04/01 08:32:54 1.11
+++ str_basic.c 2003/01/06 19:13:47 1.12
@@ -1,9 +1,9 @@
/*
** OSSP str - String Handling
-** Copyright (c) 1999-2002 Ralf S. Engelschall <rse@engelschall.com>
-** Copyright (c) 1999-2002 The OSSP Project <http://www.ossp.org/>
+** Copyright (c) 1999-2003 Ralf S. Engelschall <rse@engelschall.com>
+** Copyright (c) 1999-2003 The OSSP Project <http://www.ossp.org/>
**
-** This file is part of OSSP str, a string handling and manipulation
+** This file is part of OSSP str, a string handling and manipulation
** library which can be found at http://www.ossp.org/pkg/lib/str/.
**
** Permission to use, copy, modify, and distribute this software for
@@ -29,7 +29,7 @@
#include "str_p.h"
-/*
+/*
* str_len -- determine length of string.
* This is exactly equal to POSIX strlen(3).
*/
@@ -58,12 +58,12 @@
if (as == NULL || at == NULL)
return NULL;
- if (n == 0)
+ if (n == 0)
n = str_len(at);
t = at;
s = as;
rv = as;
- if (s > t) {
+ if (s > t) {
/* must go high to low */
t += n - 1;
s += n;
@@ -82,9 +82,9 @@
return rv;
}
-/*
+/*
* str_dup -- duplicate a string.
- * This is inspired by POSIX strdup(3), but provides
+ * This is inspired by POSIX strdup(3), but provides
* the ability to specify a maximum length.
*/
char *str_dup(const char *s, str_size_t n)
@@ -105,7 +105,7 @@
return rv;
}
-/*
+/*
* str_concat -- concatenate one or more strings.
* This function allows one to concatenate an arbitrary number of
* strings and is inspired by Apache's ap_pstrcat() function.
@@ -156,9 +156,9 @@
return rv;
}
-/*
+/*
* str_splice -- splice one string into another.
- * This is inspired by Perl's splice() function and can be used
+ * This is inspired by Perl's splice() function and can be used
* both for inplace movements, insert and cut-out operations.
*/
char *str_splice(char *s, str_size_t off, str_size_t n, char *t, str_size_t m)
@@ -199,7 +199,7 @@
return s;
}
-/*
+/*
* str_compare -- compare a two strings.
* This is inspired by POSIX str[n][case]cmp(3), but
* merges all functionality in a single function.
@@ -218,7 +218,7 @@
/* compare case insensitive */
do {
if (str_tolower(*s1) != str_tolower(*s2++)) {
- rv = ((str_tolower(*s1) -
+ rv = ((str_tolower(*s1) -
str_tolower(*(s2 - 1))) < 0 ? -1 : +1);
break;
}
@@ -231,7 +231,7 @@
/* compare case sensitive */
do {
if (*s1 != *s2++) {
- rv = (((int)(*(const unsigned char *)s1) -
+ rv = (((int)(*(const unsigned char *)s1) -
(int)(*(const unsigned char *)(s2 - 1))) < 0 ? -1 : +1);
break;
}
|