commit 5352eca2db8417f73dbb7ae3ea17c1defc96b08d
parent 6b4cd931a888b8fb46795ae01efb36d7adf6de8b
Author: ByteProject <stefan.vogt@byteproject.net>
Date: Mon, 26 Dec 2011 21:55:43 +0100
exact implementation of the PHP function substr()
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(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
@@ -20,7 +20,7 @@
#ifndef substr_h
#define substr_h
-// Returns the portion of a string specified by start and length parameters.
+// Returns portion of a string specified by start and length parameters.
char *substr(char *str, size_t begin, size_t len);
#endif