add strindex function 19/1919/6
antoine ELIAS [Tue, 14 Sep 2010 14:52:32 +0000 (16:52 +0200)]
Change-Id: I374904399dd994292c7ec8ee204f9337645b8710

scilab/modules/fileio/Makefile.am
scilab/modules/fileio/Makefile.in
scilab/modules/string/Makefile.am
scilab/modules/string/Makefile.in
scilab/modules/string/includes/gw_string.h
scilab/modules/string/includes/string_gw.hxx
scilab/modules/string/sci_gateway/c/gw_string.c
scilab/modules/string/sci_gateway/cpp/sci_strindex.cpp
scilab/modules/string/sci_gateway/cpp/string_gw.cpp
scilab/modules/string/sci_gateway/cpp/string_gw.vcproj
scilab/modules/string/src/c/string.vcproj

index dec1e05..b1062c7 100644 (file)
@@ -81,7 +81,6 @@ sci_gateway/c/sci_get_absolute_file_path.c  \
 sci_gateway/c/sci_getrelativefilename.c \
 sci_gateway/c/sci_copyfile.c \
 sci_gateway/c/sci_movefile.c \
-sci_gateway/c/sci_basename.c \
 sci_gateway/c/sci_isfile.c
 
 GATEWAY_CPP_SOURCES = \
@@ -96,7 +95,8 @@ GATEWAY_CPP_SOURCES = \
        sci_gateway/cpp/sci_isdir.cpp \
        sci_gateway/cpp/sci_filesep.cpp \
        sci_gateway/cpp/sci_fileparts.cpp \
-       sci_gateway/cpp/sci_findfiles.cpp
+       sci_gateway/cpp/sci_findfiles.cpp \
+       sci_gateway/cpp/sci_basename.cpp
 
 FILEIO_CPP_SOURCES = \
        src/cpp/expandPathVariable.cpp \
index 01400c4..79ad78c 100644 (file)
@@ -172,8 +172,7 @@ am__objects_3 = libscifileio_la-gw_fileio.lo \
        libscifileio_la-sci_get_absolute_file_path.lo \
        libscifileio_la-sci_getrelativefilename.lo \
        libscifileio_la-sci_copyfile.lo \
-       libscifileio_la-sci_movefile.lo \
-       libscifileio_la-sci_basename.lo libscifileio_la-sci_isfile.lo
+       libscifileio_la-sci_movefile.lo libscifileio_la-sci_isfile.lo
 am__objects_4 = libscifileio_la-fileio_gw.lo \
        libscifileio_la-sci_mopen.lo libscifileio_la-sci_mclose.lo \
        libscifileio_la-sci_mget.lo libscifileio_la-sci_mput.lo \
@@ -181,7 +180,8 @@ am__objects_4 = libscifileio_la-fileio_gw.lo \
        libscifileio_la-sci_pathconvert.lo \
        libscifileio_la-sci_isdir.lo libscifileio_la-sci_filesep.lo \
        libscifileio_la-sci_fileparts.lo \
-       libscifileio_la-sci_findfiles.lo
+       libscifileio_la-sci_findfiles.lo \
+       libscifileio_la-sci_basename.lo
 am_libscifileio_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
        $(am__objects_3) $(am__objects_4)
 libscifileio_la_OBJECTS = $(am_libscifileio_la_OBJECTS)
@@ -544,7 +544,6 @@ sci_gateway/c/sci_get_absolute_file_path.c  \
 sci_gateway/c/sci_getrelativefilename.c \
 sci_gateway/c/sci_copyfile.c \
 sci_gateway/c/sci_movefile.c \
-sci_gateway/c/sci_basename.c \
 sci_gateway/c/sci_isfile.c
 
 GATEWAY_CPP_SOURCES = \
@@ -559,7 +558,8 @@ GATEWAY_CPP_SOURCES = \
        sci_gateway/cpp/sci_isdir.cpp \
        sci_gateway/cpp/sci_filesep.cpp \
        sci_gateway/cpp/sci_fileparts.cpp \
-       sci_gateway/cpp/sci_findfiles.cpp
+       sci_gateway/cpp/sci_findfiles.cpp \
+       sci_gateway/cpp/sci_basename.cpp
 
 FILEIO_CPP_SOURCES = \
        src/cpp/expandPathVariable.cpp \
@@ -1410,13 +1410,6 @@ libscifileio_la-sci_movefile.lo: sci_gateway/c/sci_movefile.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -c -o libscifileio_la-sci_movefile.lo `test -f 'sci_gateway/c/sci_movefile.c' || echo '$(srcdir)/'`sci_gateway/c/sci_movefile.c
 
-libscifileio_la-sci_basename.lo: sci_gateway/c/sci_basename.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -MT libscifileio_la-sci_basename.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-sci_basename.Tpo -c -o libscifileio_la-sci_basename.lo `test -f 'sci_gateway/c/sci_basename.c' || echo '$(srcdir)/'`sci_gateway/c/sci_basename.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscifileio_la-sci_basename.Tpo $(DEPDIR)/libscifileio_la-sci_basename.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_basename.c' object='libscifileio_la-sci_basename.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -c -o libscifileio_la-sci_basename.lo `test -f 'sci_gateway/c/sci_basename.c' || echo '$(srcdir)/'`sci_gateway/c/sci_basename.c
-
 libscifileio_la-sci_isfile.lo: sci_gateway/c/sci_isfile.c
 @am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -MT libscifileio_la-sci_isfile.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-sci_isfile.Tpo -c -o libscifileio_la-sci_isfile.lo `test -f 'sci_gateway/c/sci_isfile.c' || echo '$(srcdir)/'`sci_gateway/c/sci_isfile.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscifileio_la-sci_isfile.Tpo $(DEPDIR)/libscifileio_la-sci_isfile.Plo
@@ -1585,6 +1578,13 @@ libscifileio_la-sci_findfiles.lo: sci_gateway/cpp/sci_findfiles.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscifileio_la-sci_findfiles.lo `test -f 'sci_gateway/cpp/sci_findfiles.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_findfiles.cpp
 
+libscifileio_la-sci_basename.lo: sci_gateway/cpp/sci_basename.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscifileio_la-sci_basename.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-sci_basename.Tpo -c -o libscifileio_la-sci_basename.lo `test -f 'sci_gateway/cpp/sci_basename.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_basename.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscifileio_la-sci_basename.Tpo $(DEPDIR)/libscifileio_la-sci_basename.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sci_gateway/cpp/sci_basename.cpp' object='libscifileio_la-sci_basename.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscifileio_la-sci_basename.lo `test -f 'sci_gateway/cpp/sci_basename.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_basename.cpp
+
 mostlyclean-libtool:
        -rm -f *.lo
 
index f221bcc..c05af4c 100644 (file)
@@ -38,7 +38,6 @@ sci_gateway/c/sci_convstr.c \
 sci_gateway/c/sci_emptystr.c \
 sci_gateway/c/sci_str2code.c \
 sci_gateway/c/sci_strcat.c \
-sci_gateway/c/sci_strindex.c \
 sci_gateway/c/sci_string.c \
 sci_gateway/c/sci_strsplit.c \
 sci_gateway/c/sci_strsubst.c \
@@ -64,7 +63,8 @@ GATEWAY_CPP_SOURCES = \
        sci_gateway/cpp/string_gw.cpp \
        sci_gateway/cpp/sci_regexp.cpp \
        sci_gateway/cpp/sci_part.cpp \
-       sci_gateway/cpp/sci_length.cpp
+       sci_gateway/cpp/sci_length.cpp \
+       sci_gateway/cpp/sci_strindex.cpp
 
 GATEWAY_FORTRAN_SOURCES =  sci_gateway/fortran/sci_string.f \
 sci_gateway/fortran/strops.f
index a712445..48aaee7 100644 (file)
@@ -136,8 +136,7 @@ am__objects_4 = libscistring_la-gw_string.lo \
        libscistring_la-sci_ascii.lo libscistring_la-sci_code2str.lo \
        libscistring_la-sci_convstr.lo libscistring_la-sci_emptystr.lo \
        libscistring_la-sci_str2code.lo libscistring_la-sci_strcat.lo \
-       libscistring_la-sci_strindex.lo libscistring_la-sci_string.lo \
-       libscistring_la-sci_strsplit.lo \
+       libscistring_la-sci_string.lo libscistring_la-sci_strsplit.lo \
        libscistring_la-sci_strsubst.lo libscistring_la-sci_tokens.lo \
        libscistring_la-sci_strcmp.lo libscistring_la-sci_isletter.lo \
        libscistring_la-sci_isdigit.lo \
@@ -151,7 +150,7 @@ am__objects_5 = sci_string.lo strops.lo
 am__objects_6 = libscistring_la-sci_stripblanks.lo \
        libscistring_la-sci_grep.lo libscistring_la-string_gw.lo \
        libscistring_la-sci_regexp.lo libscistring_la-sci_part.lo \
-       libscistring_la-sci_length.lo
+       libscistring_la-sci_length.lo libscistring_la-sci_strindex.lo
 am_libscistring_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
        $(am__objects_3) $(am__objects_4) $(am__objects_5) \
        $(am__objects_6)
@@ -478,7 +477,6 @@ sci_gateway/c/sci_convstr.c \
 sci_gateway/c/sci_emptystr.c \
 sci_gateway/c/sci_str2code.c \
 sci_gateway/c/sci_strcat.c \
-sci_gateway/c/sci_strindex.c \
 sci_gateway/c/sci_string.c \
 sci_gateway/c/sci_strsplit.c \
 sci_gateway/c/sci_strsubst.c \
@@ -504,7 +502,8 @@ GATEWAY_CPP_SOURCES = \
        sci_gateway/cpp/string_gw.cpp \
        sci_gateway/cpp/sci_regexp.cpp \
        sci_gateway/cpp/sci_part.cpp \
-       sci_gateway/cpp/sci_length.cpp
+       sci_gateway/cpp/sci_length.cpp \
+       sci_gateway/cpp/sci_strindex.cpp
 
 GATEWAY_FORTRAN_SOURCES = sci_gateway/fortran/sci_string.f \
 sci_gateway/fortran/strops.f
@@ -986,13 +985,6 @@ libscistring_la-sci_strcat.lo: sci_gateway/c/sci_strcat.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscistring_la_CPPFLAGS) $(CPPFLAGS) $(libscistring_la_CFLAGS) $(CFLAGS) -c -o libscistring_la-sci_strcat.lo `test -f 'sci_gateway/c/sci_strcat.c' || echo '$(srcdir)/'`sci_gateway/c/sci_strcat.c
 
-libscistring_la-sci_strindex.lo: sci_gateway/c/sci_strindex.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscistring_la_CPPFLAGS) $(CPPFLAGS) $(libscistring_la_CFLAGS) $(CFLAGS) -MT libscistring_la-sci_strindex.lo -MD -MP -MF $(DEPDIR)/libscistring_la-sci_strindex.Tpo -c -o libscistring_la-sci_strindex.lo `test -f 'sci_gateway/c/sci_strindex.c' || echo '$(srcdir)/'`sci_gateway/c/sci_strindex.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscistring_la-sci_strindex.Tpo $(DEPDIR)/libscistring_la-sci_strindex.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_strindex.c' object='libscistring_la-sci_strindex.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscistring_la_CPPFLAGS) $(CPPFLAGS) $(libscistring_la_CFLAGS) $(CFLAGS) -c -o libscistring_la-sci_strindex.lo `test -f 'sci_gateway/c/sci_strindex.c' || echo '$(srcdir)/'`sci_gateway/c/sci_strindex.c
-
 libscistring_la-sci_string.lo: sci_gateway/c/sci_string.c
 @am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscistring_la_CPPFLAGS) $(CPPFLAGS) $(libscistring_la_CFLAGS) $(CFLAGS) -MT libscistring_la-sci_string.lo -MD -MP -MF $(DEPDIR)/libscistring_la-sci_string.Tpo -c -o libscistring_la-sci_string.lo `test -f 'sci_gateway/c/sci_string.c' || echo '$(srcdir)/'`sci_gateway/c/sci_string.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscistring_la-sci_string.Tpo $(DEPDIR)/libscistring_la-sci_string.Plo
@@ -1189,6 +1181,13 @@ libscistring_la-sci_length.lo: sci_gateway/cpp/sci_length.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscistring_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscistring_la-sci_length.lo `test -f 'sci_gateway/cpp/sci_length.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_length.cpp
 
+libscistring_la-sci_strindex.lo: sci_gateway/cpp/sci_strindex.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscistring_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscistring_la-sci_strindex.lo -MD -MP -MF $(DEPDIR)/libscistring_la-sci_strindex.Tpo -c -o libscistring_la-sci_strindex.lo `test -f 'sci_gateway/cpp/sci_strindex.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_strindex.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscistring_la-sci_strindex.Tpo $(DEPDIR)/libscistring_la-sci_strindex.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sci_gateway/cpp/sci_strindex.cpp' object='libscistring_la-sci_strindex.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscistring_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscistring_la-sci_strindex.lo `test -f 'sci_gateway/cpp/sci_strindex.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_strindex.cpp
+
 .f.o:
        $(F77COMPILE) -c -o $@ $<
 
index a55929e..5cef1fe 100644 (file)
@@ -26,7 +26,6 @@ STRING_IMPEXP int sci_emptystr(char *fname,unsigned long fname_len);
 STRING_IMPEXP int sci_str2code(char *fname,unsigned long fname_len);
 STRING_IMPEXP int sci_code2str(char *fname,unsigned long fname_len);
 STRING_IMPEXP int sci_strcat(char *fname,unsigned long fname_len);
-STRING_IMPEXP int sci_strindex(char *fname,unsigned long fname_len);
 STRING_IMPEXP int sci_ascii(char *fname,unsigned long fname_len);
 STRING_IMPEXP int sci_tokens(char *fname,unsigned long fname_len);
 STRING_IMPEXP int sci_strcmp(char *fname,unsigned long fname_len);
index da5ff12..8ad4799 100644 (file)
@@ -32,6 +32,7 @@ CPP_GATEWAY_PROTOTYPE(sci_stripblanks);
 CPP_GATEWAY_PROTOTYPE(sci_regexp);
 CPP_GATEWAY_PROTOTYPE(sci_part);
 CPP_GATEWAY_PROTOTYPE(sci_length);
+CPP_GATEWAY_PROTOTYPE(sci_strindex);
 
 
 #endif /* !__STRING_GW_HXX__ */
index 50ac938..656cdac 100644 (file)
@@ -27,7 +27,7 @@ static gw_generic_table Tab[] =
        {sci_str2code,"str2code"},
        {sci_code2str,"code2str"},
        {sci_strcat,"strcat"},
-       {sci_strindex,"strindex"},
+       {NULL, ""}, //strindex
        {NULL, ""}, //strsubst
        {sci_ascii,"ascii"},
        {NULL, ""}, //grep
index 8caf0c6..d44e6d0 100644 (file)
 /* desc : search position of a character string in an other string        */
 /*        using regular expression .                                      */
 /*------------------------------------------------------------------------*/
+#include "funcmanager.hxx"
+#include "string_gw.hxx"
+
+extern "C"
+{
 #include <string.h>
 #include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include "gw_string.h"
 #include "pcre.h"
-#include "stack-c.h"
-#include "MALLOC.h"
 #include "localization.h"
-#include "freeArrayOfString.h"
 #include "pcre_private.h"
-#include "BOOL.h"
 #include "pcre_error.h"
 #include "Scierror.h"
-#include "charEncoding.h"
-#include "os_strdup.h"
+}
 /*------------------------------------------------------------------------*/
-#define CHAR_S "s"
-#define CHAR_R "r"
+#define WCHAR_S L's'
+#define WCHAR_R L'r'
 /*------------------------------------------------------------------------*/
 struct In
 {
                int data;
                int position;
-} ;
+};
 /*------------------------------------------------------------------------*/
-int cmp( const void *a ,const void *b)
+int ComparaisonCallback( const void *in1 ,const void *in2)
 {
-return (*(struct In *)a).data > (*(struct In *)b).data ? 1 : -1;
+    return ((In*)in1)->data > ((In*)in2)->data ? 1 : -1;
 }
 /*------------------------------------------------------------------------*/
-int sci_strindex(char *fname,unsigned long fname_len)
+types::Function::ReturnValue sci_strindex(types::typed_list &in, int _iRetCount, types::typed_list &out)
 {
-       BOOL bStrindex_with_pattern = FALSE;
-       int outIndex = 0;
-       int numRow = 1;
-    int *next = NULL;
-       int i = 0;
-
-       CheckRhs(2,3);
-       CheckLhs(1,2);
-
-       if (Rhs == 3)
-       {
-               int m3 = 0;
-               int n3 = 0;
-               char **Strings_Input3 = NULL;
-               int m3n3 = 0; /* m3 * n3 */
-
-               if (VarType(3) != sci_strings)
-               {
-                       Scierror(999,_("%s: Wrong type for input argument #%d: Character expected.\n"),fname,3);
-                       return 0;
-               }
-               GetRhsVar(3, MATRIX_OF_STRING_DATATYPE, &m3, &n3, &Strings_Input3);
-               m3n3 = m3 * n3;
-
-               if (m3n3 != 1)
-               {
-                       freeArrayOfString(Strings_Input3, m3n3);
-                       Scierror(999,_("%s: Wrong type for input argument #%d: Character expected.\n"), fname, 3);
-                       return 0;
-               }
-
-               if ( (strcmp(Strings_Input3[0],CHAR_R) == 0) || (strcmp(Strings_Input3[0],CHAR_S) == 0) )
-               {
-                       if (strcmp(Strings_Input3[0],CHAR_R) == 0)
-                       {
-                               bStrindex_with_pattern = TRUE;
-                       }
-                       else
-                       {
-                               bStrindex_with_pattern = FALSE;
-                       }
-                       freeArrayOfString(Strings_Input3, m3n3);
-               }
-               else
-               {
-                       freeArrayOfString(Strings_Input3, m3n3);
-                       Scierror(999,_("%s: Wrong value for input argument #%d: '%s' or '%s' expected.\n"),fname,3,CHAR_S,CHAR_R);
-                       return 0;
-               }
-       }
-
-       if (VarType(1) == sci_matrix)
-       {
-               int m1 = 0;
-               int n1 = 0;
-               int l1 = 0;
-
-               GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);
-               if ((m1 == 0) && (n1 == 0))
-               {
-                       CreateVar(Rhs+1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);
-                       LhsVar(1) = Rhs+1 ;
-                       C2F(putlhsvar)();
-                       return 0;
-               }
-               else
-               {
-                       Scierror(999,_("%s: Wrong type for input argument #%d: Matrix of strings or empty matrix expected.\n"),fname,3);
-                       return 0;
-               }
-       }
-
-       if ( (VarType(1) == sci_strings) && (VarType(2) == sci_strings) )
-       {
-               int m1 = 0, n1 = 0;
-               char **Strings_Input1 = NULL;
-               wchar_t *wStrings_Input1 = NULL;
-               int m1n1 = 0; /* m1 * n1 */
-
-               int m2 = 0, n2 = 0;
-               char **Strings_Input2 = NULL;
-               wchar_t **wStrings_Input2 = NULL;
-               int m2n2 = 0; /* m2 * n2 */
-
-               struct In *values=NULL;
-
-               int nbValues = 0;
-               int nbposition = 0;
-
-               int i = 0;
-
-               GetRhsVar(1,MATRIX_OF_STRING_DATATYPE,&m1,&n1,&Strings_Input1);
-               m1n1 = m1*n1;
-
-               if (m1n1 != 1)
-               {
-                       freeArrayOfString(Strings_Input1,m1n1);
-                       Scierror(999,_("%s: Wrong size for input argument #%d: A string expected.\n"),fname,1);
-                       return 0;
-               }
-
-               wStrings_Input1 = to_wide_string(Strings_Input1[0]);
-               if (wStrings_Input1 == NULL)
-               {
-                       /* string conversion fails */
-                       freeArrayOfString(Strings_Input1,m1n1);
-                       freeArrayOfString(Strings_Input2,m2n2);
-                       Scierror(999,_("%s: Wrong value for input argument #%d: A valid string expected (UTF-8 Encoding problem).\n"),fname,1);
-                       return 0;
-               }
-
-               GetRhsVar(2,MATRIX_OF_STRING_DATATYPE,&m2,&n2,&Strings_Input2);
-               m2n2 = m2*n2;
-
-               if ( (m2 != 1) && (n2 != 1) )
-               {
-                       freeArrayOfString(Strings_Input1,m1n1);
-                       freeArrayOfString(Strings_Input2,m2n2);
-                       Scierror(999,_("%s: Wrong type for input argument #%d: Row vector of strings or column vector of strings expected.\n"),fname,2);
-                       return 0;
-               }
-
-               wStrings_Input2 = (wchar_t**)MALLOC(m2n2 * sizeof(wchar_t*));
-               for(i = 0 ; i < m2n2 ; i++)
-               {
-                       wStrings_Input2[i] = to_wide_string(Strings_Input2[i]);
-               }
-
-               if ( (int)wcslen(wStrings_Input1) == 0 )
-               {
-                       values= (struct In*)MALLOC(sizeof(struct In));
-               }
-               else
-               {
-                       values = (struct In *)MALLOC( sizeof(struct In) * ( wcslen(wStrings_Input1) ) * m2n2);
-               }
-
-               if (bStrindex_with_pattern)
-               {
-                       int x = 0;
-                       pcre_error_code w = PCRE_FINISHED_OK;
-
-                       int Output_Start = 0;
-                       int Output_End = 0;
-
-                       /* We use pcre library */
-                       for (x = 0; x < m2n2; ++x)
-                       {
-                               w = pcre_private(Strings_Input1[0],Strings_Input2[x],&Output_Start,&Output_End);
-                               if ( w == PCRE_FINISHED_OK)
-                               {
-                                       char *partStr = os_strdup(Strings_Input1[0]);
-                                       wchar_t *wcpartStr = NULL;
-                                       partStr[Output_Start] = '\0';
-                                       wcpartStr = to_wide_string(partStr);
-                                       values[nbValues++].data = (int)wcslen(wcpartStr) + 1; /* adding the answer into the outputmatrix */
-                                       values[nbposition++].position = x+1;        /* The number according to the str2 matrix */
-
-                                       if (partStr) {FREE(partStr); partStr = NULL;}
-                                       if (wcpartStr) {FREE(wcpartStr); wcpartStr = NULL;}
-                               }
-                               else
-                               {
-                                       if (w != NO_MATCH)
-                                       {
-                                               freeArrayOfString(Strings_Input1,m1n1);
-                                               freeArrayOfString(Strings_Input2,m2n2);
-                                               pcre_error(fname,w);
-                                               return 0;
-                                       }
-                                       break;
-                               }
-                       }
-
-                       qsort(values,nbValues,sizeof(values[0]),cmp);
-
-               }
-               else
-               {
-                       /* We don't use pcre library */
-                       int x = 0;
-                       int pos = 0;
-
-                       for (x=0; x < m2n2 ;++x)
-                       {
-                               int w = 0;
-                               if ( wcslen(wStrings_Input2[x]) == 0 )
-                               {
-                                       freeArrayOfString(Strings_Input2,m2n2);
-                                       freeArrayOfString(Strings_Input1,m1n1);
-                                       if (next) {FREE(next); next = NULL;}
-                                       if (values) {FREE(values); values = NULL;}
-                                       Scierror(999, _("%s: Wrong size for input argument #%d: Non-empty string expected.\n"), fname,2);
-                                       return 0;
-                               }
-                               if (Strings_Input2)
-                               {
-                                       wchar_t *pCur = wStrings_Input1;
-                                       do
-                                       {
-                                               pCur = wcsstr(pCur, wStrings_Input2[x]);
-                                               if (pCur != NULL)
-                                               {
-                                                       pCur++;
-                                                       values[nbValues++].data = (int)(pCur - wStrings_Input1);
-                                                       values[nbposition++].position = x+1;
-                                               }
-                                       }
-                                       while(pCur != NULL && *pCur != 0);//Plus tard
-
-                                       /* values are sorted */
-                                       qsort(values,nbValues,sizeof(values[0]),cmp);
-                               }
-                       }
-               }
-
-               FREE(wStrings_Input1);
-               freeArrayOfWideString(wStrings_Input2, m2n2);
-               freeArrayOfString(Strings_Input1,m1n1);
-               freeArrayOfString(Strings_Input2,m2n2);
-
-               numRow   = 1;
-               outIndex = 0;
-               CreateVar(Rhs+1,MATRIX_OF_DOUBLE_DATATYPE,&numRow,&nbValues,&outIndex);
-               for ( i = 0 ; i < nbValues ; i++ )
-               {
-                       stk(outIndex)[i] = (double)values[i].data ;
-               }
-               LhsVar(1) = Rhs+1 ;
-
-               if (Lhs == 2)
-               {
-                       numRow   = 1;
-                       outIndex = 0;
-                       CreateVar(Rhs+2,MATRIX_OF_DOUBLE_DATATYPE,&numRow,&nbposition,&outIndex);
-                       for ( i = 0 ; i < nbposition ; i++ )
+    bool bRegExp = false;
+    if(in.size() < 2 || in.size() > 3)
+    {
+        ScierrorW(77, _W("%ls: Wrong number of input argument(s): %d to %d expected.\n"),L"strindex", 2, 3);
+        return Function::Error;
+    }
+    
+    if(in.size() > 2)
+    {
+        if(in[2]->isString() == false && in[2]->getAsString()->size_get() != 1)
+        {
+            ScierrorW(999, _W("%ls: Wrong type for input argument #%d: A string expected.\n"), L"strindex", 3);
+            return Function::Error;
+        }
+
+        if(in[2]->getAsString()->string_get(0)[0] == WCHAR_R)
+        {
+            bRegExp = true;
+        }
+        else if(in[2]->getAsString()->string_get(0)[0] == WCHAR_S)
+        {
+            bRegExp = false;
+        }
+        else
+        {
+            ScierrorW(999, _W("%ls: Wrong value for input argument #%d: 's' or 'r' expected.\n"), L"strindex", 3);
+            return Function::Error;
+        }
+    }
+
+    if(in[1]->isString() == false || (in[1]->getAsString()->rows_get() != 1 && in[1]->getAsString()->cols_get() != 1))
+    {
+        ScierrorW(999, _W("%ls: Wrong type for input argument #%d: A string or a string vector expected.\n"), L"strindex", 2);
+        return Function::Error;
+    }
+
+    String* pS = in[1]->getAsString();
+    wchar_t** pwstSearch = pS->string_get();
+
+    if(in[0]->isDouble() && in[0]->getAsDouble()->isEmpty())
+    {
+        out.push_back(Double::Empty());
+        return Function::OK;
+    }
+
+    if(in[0]->isString() == false || in[0]->getAsString()->size_get() != 1)
+    {
+        ScierrorW(999, _W("%ls: Wrong type for input argument #%d: A string expected.\n"), L"strindex", 1);
+        return Function::Error;
+    }
+
+    wchar_t* pwstData = in[0]->getAsString()->string_get()[0];
+
+    //be sure to not alloc 0
+    In* pstrResult = new In[wcslen(pwstData) == 0 ? 1 : wcslen(pwstData)];
+
+    //number of occurances
+    int iValues = 0;
+    if(bRegExp)
+    {//pcre
+        pcre_error_code errorCode = PCRE_FINISHED_OK;
+
+       //              int Output_Start = 0;
+       //              int Output_End = 0;
+
+       //              /* We use pcre library */
+        char* pstIn = wide_string_to_UTF8(pwstData);
+        for(int i = 0 ; i < pS->size_get() ; i++)
+        {
+            int iStart      = 0;
+            int iEnd        = 0;
+            char* pstSearch = wide_string_to_UTF8(pwstSearch[i]);
+
+            errorCode = pcre_private(pstIn, pstSearch, &iStart,&iEnd);
+
+            if ( errorCode == PCRE_FINISHED_OK)
                        {
-                               stk(outIndex)[i] = (double)values[i].position ;
-                       }
-                       LhsVar(2) = Rhs+2;
-               }
-
-               C2F(putlhsvar)();
-
-               if (values) {FREE(values); values = NULL;}
-       }
-       else
-       {
-               if(VarType(1) != sci_strings)
-               {
-                       Scierror(999,_("%s: Wrong type for input argument #%d: A string expected.\n"),fname,1);
-               }
-               else
-               {
-                       Scierror(999,_("%s: Wrong type for input argument #%d: Row vector of strings or column vector of strings expected.\n"),fname,2);
-               }
-               return 0;
-       }
-       return 0;
+                pstSearch[iStart]               = L'\0';
+                wchar_t* pstTemp                = to_wide_string(pstSearch);
+                pstrResult[iValues].data        = (int)wcslen(pstTemp) + 1;
+                pstrResult[iValues].position    = i + 1;
+                iValues++;
+                FREE(pstTemp);
+            }
+            else
+            {
+                if (errorCode != NO_MATCH)
+                {
+                    pcre_error("strindex", errorCode);
+                    FREE(pstSearch);
+                    FREE(pstIn);
+                    delete[] pstrResult;
+                    return Function::Error;
+                }
+                    break;
+            }
+            FREE(pstSearch);
+        }
+        FREE(pstIn);
+    }
+    else
+    {
+        for(int i = 0 ; i < pS->size_get() ; i++)
+        {
+            wchar_t* pCur = pwstData;
+            do
+            {
+                pCur = wcsstr(pCur, pwstSearch[i]);
+                if(pCur != NULL)
+                {
+                    pstrResult[iValues].data      = (int)(pCur - pwstData + 1);
+                    pstrResult[iValues].position  = i + 1;
+                    pCur++;
+                    iValues++;
+                }
+            }while(pCur != NULL && pCur[0] != L'\0');
+        }
+    }
+
+    qsort(pstrResult, iValues, sizeof(In), ComparaisonCallback);
+
+    Double* pIndex = new Double(1, iValues);
+    for(int i = 0 ; i < iValues ; i++)
+    {
+        pIndex->val_set(0, i, pstrResult[i].data);
+    }
+
+    out.push_back(pIndex);
+
+    if(_iRetCount == 2)
+    {
+        Double* pPos = new Double(1, iValues);
+        for(int i = 0 ; i < iValues ; i++)
+        {
+            pPos->val_set(0, i, pstrResult[i].position);
+        }
+        out.push_back(pPos);
+    }
+
+    delete[] pstrResult;
+    return Function::OK;
+       //BOOL bStrindex_with_pattern = FALSE;
+       //int outIndex = 0;
+       //int numRow = 1;
+ //   int *next = NULL;
+       //int i = 0;
+
+       //CheckRhs(2,3);
+       //CheckLhs(1,2);
+
+       //if (Rhs == 3)
+       //{
+       //      int m3 = 0;
+       //      int n3 = 0;
+       //      char **Strings_Input3 = NULL;
+       //      int m3n3 = 0; /* m3 * n3 */
+
+       //      if (VarType(3) != sci_strings)
+       //      {
+       //              Scierror(999,_("%s: Wrong type for input argument #%d: Character expected.\n"),fname,3);
+       //              return 0;
+       //      }
+       //      GetRhsVar(3, MATRIX_OF_STRING_DATATYPE, &m3, &n3, &Strings_Input3);
+       //      m3n3 = m3 * n3;
+
+       //      if (m3n3 != 1)
+       //      {
+       //              freeArrayOfString(Strings_Input3, m3n3);
+       //              Scierror(999,_("%s: Wrong type for input argument #%d: Character expected.\n"), fname, 3);
+       //              return 0;
+       //      }
+
+       //      if ( (strcmp(Strings_Input3[0],CHAR_R) == 0) || (strcmp(Strings_Input3[0],CHAR_S) == 0) )
+       //      {
+       //              if (strcmp(Strings_Input3[0],CHAR_R) == 0)
+       //              {
+       //                      bStrindex_with_pattern = TRUE;
+       //              }
+       //              else
+       //              {
+       //                      bStrindex_with_pattern = FALSE;
+       //              }
+       //              freeArrayOfString(Strings_Input3, m3n3);
+       //      }
+       //      else
+       //      {
+       //              freeArrayOfString(Strings_Input3, m3n3);
+       //              Scierror(999,_("%s: Wrong value for input argument #%d: '%s' or '%s' expected.\n"),fname,3,CHAR_S,CHAR_R);
+       //              return 0;
+       //      }
+       //}
+
+       //if (VarType(1) == sci_matrix)
+       //{
+       //      int m1 = 0;
+       //      int n1 = 0;
+       //      int l1 = 0;
+
+       //      GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);
+       //      if ((m1 == 0) && (n1 == 0))
+       //      {
+       //              CreateVar(Rhs+1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);
+       //              LhsVar(1) = Rhs+1 ;
+       //              C2F(putlhsvar)();
+       //              return 0;
+       //      }
+       //      else
+       //      {
+       //              Scierror(999,_("%s: Wrong type for input argument #%d: Matrix of strings or empty matrix expected.\n"),fname,3);
+       //              return 0;
+       //      }
+       //}
+
+       //if ( (VarType(1) == sci_strings) && (VarType(2) == sci_strings) )
+       //{
+       //      int m1 = 0, n1 = 0;
+       //      char **Strings_Input1 = NULL;
+       //      wchar_t *wStrings_Input1 = NULL;
+       //      int m1n1 = 0; /* m1 * n1 */
+
+       //      int m2 = 0, n2 = 0;
+       //      char **Strings_Input2 = NULL;
+       //      wchar_t **wStrings_Input2 = NULL;
+       //      int m2n2 = 0; /* m2 * n2 */
+
+       //      struct In *values=NULL;
+
+       //      int nbValues = 0;
+       //      int nbposition = 0;
+
+       //      int i = 0;
+
+       //      GetRhsVar(1,MATRIX_OF_STRING_DATATYPE,&m1,&n1,&Strings_Input1);
+       //      m1n1 = m1*n1;
+
+       //      if (m1n1 != 1)
+       //      {
+       //              freeArrayOfString(Strings_Input1,m1n1);
+       //              Scierror(999,_("%s: Wrong size for input argument #%d: A string expected.\n"),fname,1);
+       //              return 0;
+       //      }
+
+       //      wStrings_Input1 = to_wide_string(Strings_Input1[0]);
+       //      if (wStrings_Input1 == NULL)
+       //      {
+       //              /* string conversion fails */
+       //              freeArrayOfString(Strings_Input1,m1n1);
+       //              freeArrayOfString(Strings_Input2,m2n2);
+       //              Scierror(999,_("%s: Wrong value for input argument #%d: A valid string expected (UTF-8 Encoding problem).\n"),fname,1);
+       //              return 0;
+       //      }
+
+       //      GetRhsVar(2,MATRIX_OF_STRING_DATATYPE,&m2,&n2,&Strings_Input2);
+       //      m2n2 = m2*n2;
+
+       //      if ( (m2 != 1) && (n2 != 1) )
+       //      {
+       //              freeArrayOfString(Strings_Input1,m1n1);
+       //              freeArrayOfString(Strings_Input2,m2n2);
+       //              Scierror(999,_("%s: Wrong type for input argument #%d: Row vector of strings or column vector of strings expected.\n"),fname,2);
+       //              return 0;
+       //      }
+
+       //      wStrings_Input2 = (wchar_t**)MALLOC(m2n2 * sizeof(wchar_t*));
+       //      for(i = 0 ; i < m2n2 ; i++)
+       //      {
+       //              wStrings_Input2[i] = to_wide_string(Strings_Input2[i]);
+       //      }
+
+       //      if ( (int)wcslen(wStrings_Input1) == 0 )
+       //      {
+       //              values= (struct In*)MALLOC(sizeof(struct In));
+       //      }
+       //      else
+       //      {
+       //              values = (struct In *)MALLOC( sizeof(struct In) * ( wcslen(wStrings_Input1) ) * m2n2);
+       //      }
+
+       //      if (bStrindex_with_pattern)
+       //      {
+       //              int x = 0;
+       //              pcre_error_code w = PCRE_FINISHED_OK;
+
+       //              int Output_Start = 0;
+       //              int Output_End = 0;
+
+       //              /* We use pcre library */
+       //              for (x = 0; x < m2n2; ++x)
+       //              {
+       //                      w = pcre_private(Strings_Input1[0],Strings_Input2[x],&Output_Start,&Output_End);
+       //                      if ( w == PCRE_FINISHED_OK)
+       //                      {
+       //                              char *partStr = os_strdup(Strings_Input1[0]);
+       //                              wchar_t *wcpartStr = NULL;
+       //                              partStr[Output_Start] = '\0';
+       //                              wcpartStr = to_wide_string(partStr);
+       //                              values[nbValues++].data = (int)wcslen(wcpartStr) + 1; /* adding the answer into the outputmatrix */
+       //                              values[nbposition++].position = x+1;        /* The number according to the str2 matrix */
+
+       //                              if (partStr) {FREE(partStr); partStr = NULL;}
+       //                              if (wcpartStr) {FREE(wcpartStr); wcpartStr = NULL;}
+       //                      }
+       //                      else
+       //                      {
+       //                              if (w != NO_MATCH)
+       //                              {
+       //                                      freeArrayOfString(Strings_Input1,m1n1);
+       //                                      freeArrayOfString(Strings_Input2,m2n2);
+       //                                      pcre_error(fname,w);
+       //                                      return 0;
+       //                              }
+       //                              break;
+       //                      }
+       //              }
+
+       //              qsort(values,nbValues,sizeof(values[0]),cmp);
+
+       //      }
+       //      else
+       //      {
+       //              /* We don't use pcre library */
+       //              int x = 0;
+       //              int pos = 0;
+
+       //              for (x=0; x < m2n2 ;++x)
+       //              {
+       //                      int w = 0;
+       //                      if ( wcslen(wStrings_Input2[x]) == 0 )
+       //                      {
+       //                              freeArrayOfString(Strings_Input2,m2n2);
+       //                              freeArrayOfString(Strings_Input1,m1n1);
+       //                              if (next) {FREE(next); next = NULL;}
+       //                              if (values) {FREE(values); values = NULL;}
+       //                              Scierror(999, _("%s: Wrong size for input argument #%d: Non-empty string expected.\n"), fname,2);
+       //                              return 0;
+       //                      }
+       //                      if (Strings_Input2)
+       //                      {
+       //                              wchar_t *pCur = wStrings_Input1;
+       //                              do
+       //                              {
+       //                                      pCur = wcsstr(pCur, wStrings_Input2[x]);
+       //                                      if (pCur != NULL)
+       //                                      {
+       //                                              pCur++;
+       //                                              values[nbValues++].data = (int)(pCur - wStrings_Input1);
+       //                                              values[nbposition++].position = x+1;
+       //                                      }
+       //                              }
+       //                              while(pCur != NULL && *pCur != 0);//Plus tard
+
+       //                              /* values are sorted */
+       //                              qsort(values,nbValues,sizeof(values[0]),cmp);
+       //                      }
+       //              }
+       //      }
+
+       //      FREE(wStrings_Input1);
+       //      freeArrayOfWideString(wStrings_Input2, m2n2);
+       //      freeArrayOfString(Strings_Input1,m1n1);
+       //      freeArrayOfString(Strings_Input2,m2n2);
+
+       //      numRow   = 1;
+       //      outIndex = 0;
+       //      CreateVar(Rhs+1,MATRIX_OF_DOUBLE_DATATYPE,&numRow,&nbValues,&outIndex);
+       //      for ( i = 0 ; i < nbValues ; i++ )
+       //      {
+       //              stk(outIndex)[i] = (double)values[i].data ;
+       //      }
+       //      LhsVar(1) = Rhs+1 ;
+
+       //      if (Lhs == 2)
+       //      {
+       //              numRow   = 1;
+       //              outIndex = 0;
+       //              CreateVar(Rhs+2,MATRIX_OF_DOUBLE_DATATYPE,&numRow,&nbposition,&outIndex);
+       //              for ( i = 0 ; i < nbposition ; i++ )
+       //              {
+       //                      stk(outIndex)[i] = (double)values[i].position ;
+       //              }
+       //              LhsVar(2) = Rhs+2;
+       //      }
+
+       //      C2F(putlhsvar)();
+
+       //      if (values) {FREE(values); values = NULL;}
+       //}
+       //else
+       //{
+       //      if(VarType(1) != sci_strings)
+       //      {
+       //              Scierror(999,_("%s: Wrong type for input argument #%d: A string expected.\n"),fname,1);
+       //      }
+       //      else
+       //      {
+       //              Scierror(999,_("%s: Wrong type for input argument #%d: Row vector of strings or column vector of strings expected.\n"),fname,2);
+       //      }
+       //      return 0;
+       //}
+       //return 0;
 }
 /*------------------------------------------------------------------------*/
index c9c9f42..bf482d0 100644 (file)
@@ -21,5 +21,6 @@ bool StringModule::Load()
     symbol::Context::getInstance()->AddFunction(Function::createFunction(L"regexp", &sci_regexp, MODULE_NAME));
     symbol::Context::getInstance()->AddFunction(Function::createFunction(L"part", &sci_part, MODULE_NAME));
     symbol::Context::getInstance()->AddFunction(Function::createFunction(L"length", &sci_length, MODULE_NAME));
+    symbol::Context::getInstance()->AddFunction(Function::createFunction(L"strindex", &sci_strindex, MODULE_NAME));
     return true;
 }
index 20e01d5..1b31856 100644 (file)
                                >
                        </File>
                        <File
-                               RelativePath=".\sci_part.cpp"
+                               RelativePath=".\sci_length.cpp"
                                >
                        </File>
                        <File
-                               RelativePath=".\sci_length.cpp"
+                               RelativePath=".\sci_part.cpp"
                                >
                        </File>
                        <File
                                >
                        </File>
                        <File
+                               RelativePath=".\sci_strindex.cpp"
+                               >
+                       </File>
+                       <File
                                RelativePath=".\sci_stripblanks.cpp"
                                >
                        </File>
index f570e37..6d31216 100644 (file)
                                >
                        </File>
                        <File
-                               RelativePath="..\..\sci_gateway\c\sci_strindex.c"
-                               >
-                       </File>
-                       <File
                                RelativePath="..\..\sci_gateway\c\sci_string.c"
                                >
                        </File>