From 0a698ab8931d19685cb39110a5db62a81099cd9c Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 26 Feb 2008 10:07:49 +0000 Subject: implemented STARTSWITH vm instruction --- stringbuf.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'stringbuf.c') diff --git a/stringbuf.c b/stringbuf.c index ecd70113..a4f5a3ec 100755 --- a/stringbuf.c +++ b/stringbuf.c @@ -590,9 +590,12 @@ int rsCStrCStrCmp(cstr_t *pCS1, cstr_t *pCS2) } -/* check if a sz-type string start with a CStr object. This function +/* check if a sz-type string starts with a CStr object. This function * is initially written to support the "startswith" property-filter * comparison operation. Maybe it also has other needs. + * This functions is modelled after the strcmp() series, thus a + * return value of 0 indicates that the string starts with the + * sequence while -1 indicates it does not! * rgerhards 2005-10-19 */ int rsCStrSzStrStartsWithCStr(cstr_t *pCS1, uchar *psz, size_t iLenSz) @@ -625,6 +628,9 @@ int rsCStrSzStrStartsWithCStr(cstr_t *pCS1, uchar *psz, size_t iLenSz) /* check if a CStr object starts with a sz-type string. + * This functions is modelled after the strcmp() series, thus a + * return value of 0 indicates that the string starts with the + * sequence while -1 indicates it does not! * rgerhards 2005-09-26 */ int rsCStrStartsWithSzStr(cstr_t *pCS1, uchar *psz, size_t iLenSz) -- cgit v1.2.3