2 *******************************************************************************
3 * Copyright (C) 2003-2006, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 *******************************************************************************
6 * file name: regexc.cpp
7 * description: The purpose of this function is to separate the codepage
8 * conversion from the rest of the uregex_ API. This can removes any
9 * dependency on codepage conversion, which reduces the overhead of
12 #include "unicode/uregex.h"
13 #include "unicode/unistr.h"
17 //----------------------------------------------------------------------------------------
21 //----------------------------------------------------------------------------------------
22 #if !UCONFIG_NO_CONVERSION && !UCONFIG_NO_REGULAR_EXPRESSIONS
24 U_CAPI URegularExpression * U_EXPORT2
25 uregex_openC( const char *pattern,
29 if (U_FAILURE(*status)) {
32 if (pattern == NULL) {
33 *status = U_ILLEGAL_ARGUMENT_ERROR;
37 UnicodeString patString(pattern);
38 return uregex_open(patString.getBuffer(), patString.length(), flags, pe, status);