1 // Copyright (C) 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 *******************************************************************************
5 * Copyright (C) 2003-2006, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 *******************************************************************************
8 * file name: regexc.cpp
9 * description: The purpose of this function is to separate the codepage
10 * conversion from the rest of the uregex_ API. This can removes any
11 * dependency on codepage conversion, which reduces the overhead of
14 #include "unicode/uregex.h"
15 #include "unicode/unistr.h"
19 //----------------------------------------------------------------------------------------
23 //----------------------------------------------------------------------------------------
24 #if !UCONFIG_NO_CONVERSION && !UCONFIG_NO_REGULAR_EXPRESSIONS
26 U_CAPI URegularExpression * U_EXPORT2
27 uregex_openC( const char *pattern,
31 if (U_FAILURE(*status)) {
34 if (pattern == NULL) {
35 *status = U_ILLEGAL_ARGUMENT_ERROR;
39 UnicodeString patString(pattern);
40 return uregex_open(patString.getBuffer(), patString.length(), flags, pe, status);