commit fac1799893c84c667680f196d0c7ccf0f1477e15
parent 0c5bb625d4fcd38a163afd5a327fe96e40c3be5f
Author: ByteProject <stefan.vogt@byteproject.net>
Date: Mon, 26 Dec 2011 00:12:32 +0100
now properly behaving like PHP's substr() function
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ansilove/substr.c b/ansilove/substr.c
@@ -15,7 +15,7 @@
#include "substr.h"
#endif
-char *substr(const char *str, size_t begin, size_t len)
+char *substr(char *str, size_t begin, size_t len)
{
if (str == 0 || strlen(str) == 0 || strlen(str) < begin || strlen(str) < (begin+len))
return 0;
diff --git a/ansilove/substr.h b/ansilove/substr.h
@@ -21,6 +21,6 @@
#define substr_h
// Returns the portion of a string specified by start and length parameters.
-char *substr(const char *str, size_t begin, size_t len);
+char *substr(char *str, size_t begin, size_t len);
#endif