struct CCL::IRegularExpression

Overview

#include <iregexp.h>

struct IRegularExpression: public CCL::IUnknown
{
    // enums

    enum Options;

    // methods

    virtual tresult CCL_API construct (StringRef expression, int options = 0) = 0;
    virtual tbool CCL_API isFullMatch (StringRef string) const = 0;
    virtual tbool CCL_API isPartialMatch (StringRef string) const = 0;
    virtual tbool CCL_API replace (String& string, StringRef format) const = 0;
    virtual tbool CCL_API replaceAll (String& string, StringRef format) const = 0;
};

Inherited Members

public:
    // methods

    virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0;
    virtual unsigned int CCL_API retain () = 0;
    virtual unsigned int CCL_API release () = 0;

Detailed Documentation

Methods

virtual tresult CCL_API construct (StringRef expression, int options = 0) = 0

Construct with regular expression string.

virtual tbool CCL_API isFullMatch (StringRef string) const = 0

Check if expression matches the input string completely.

virtual tbool CCL_API isPartialMatch (StringRef string) const = 0

Check if expression matches any substring of input string.

virtual tbool CCL_API replace (String& string, StringRef format) const = 0

Replace first occurrence of expression in input string according to specified format.

See http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.11 for format spec.

virtual tbool CCL_API replaceAll (String& string, StringRef format) const = 0

Replace all occurrences of expression in input string according to specified format.

See http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.11 for format spec.