1 
2 /*
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) INRIA - Allan CORNET
5  *
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  *
15  */
16 
17 /*--------------------------------------------------------------------------*/
18 #ifndef __STRSUBST_H__
19 #define __STRSUBST_H__
20 
21 #include <wchar.h>
22 #include "dynlib_string.h"
23 
24 /**
25 * substitute a character string by another in a character string in string matrix
26 * @param[in] strings_input
27 * @param[in] dimension of strings_input
28 * @param[in] string_to_search
29 * @param[in] replacement_string
30 * @return substituted string matrix
31 */
32 STRING_IMPEXP char **strsubst(const char **strings_input, int strings_dim, const char *string_to_search, const char *replacement_string);
33 STRING_IMPEXP char **strsubst_reg(const char **strings_input, int strings_dim, const char *string_to_search, const char *replacement_string, int *ierr);
34 
35 /**
36 * substitute a character string by another in a character string
37 * @param[in] string
38 * @param[in] string to search in input_string
39 * @param[in] replacement_string
40 * @param[out] error returned by pcre_private
41 * @return substituted string
42 */
43 STRING_IMPEXP char *strsub(const char* input_string, const char* string_to_search, const char* replacement_string);
44 STRING_IMPEXP char *strsub_reg(const char* input_string, const char* string_to_search, const char* replacement_string, int *ierr);
45 
46 
47 STRING_IMPEXP wchar_t **wcssubst(const wchar_t** _pwstInput, int _iInputSize, const wchar_t* _pwstSearch, const wchar_t* _pwstReplace);
48 STRING_IMPEXP wchar_t **wcssubst_reg(const wchar_t** _pwstInput, int _iInputSize, const wchar_t* _pwstSearch, const wchar_t* _pwstReplace, int* _piErr);
49 
50 STRING_IMPEXP wchar_t *wcssub(const wchar_t* _pwstInput, const wchar_t* _pwstSearch, const wchar_t* _pwstReplace);
51 STRING_IMPEXP wchar_t *wcssub_reg(const wchar_t* _pwstInput, const wchar_t* _pwstSearch, const wchar_t* _pwstReplace, int* _piErr);
52 
53 #endif /* __STRSUBST_H__ */
54