summaryrefslogtreecommitdiff
path: root/Ivy/Regexp.h
diff options
context:
space:
mode:
authorfcolin2007-02-01 13:29:31 +0000
committerfcolin2007-02-01 13:29:31 +0000
commitafe2e7dfc1388cad991e8d38dda7d648c137aa52 (patch)
tree92bf63d2b2b34a805927aa294c7c51912638f66a /Ivy/Regexp.h
parent0be65f8a110ee9bf5da9c93e0bd5b5b62b3bad0c (diff)
parent04c263c314499e38d64af9d4a1aa5e2b8d9d5ead (diff)
downloadivy-cplusplus-afe2e7dfc1388cad991e8d38dda7d648c137aa52.zip
ivy-cplusplus-afe2e7dfc1388cad991e8d38dda7d648c137aa52.tar.gz
ivy-cplusplus-afe2e7dfc1388cad991e8d38dda7d648c137aa52.tar.bz2
ivy-cplusplus-afe2e7dfc1388cad991e8d38dda7d648c137aa52.tar.xz
modif struct svnwindows@3001
Diffstat (limited to 'Ivy/Regexp.h')
-rw-r--r--Ivy/Regexp.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/Ivy/Regexp.h b/Ivy/Regexp.h
new file mode 100644
index 0000000..b41d88e
--- /dev/null
+++ b/Ivy/Regexp.h
@@ -0,0 +1,41 @@
+#pragma once
+
+class regexp;
+
+class Regexp
+{
+public:
+ enum { NSUBEXP = 40 };
+
+ Regexp();
+ Regexp( const char * exp, bool iCase = 0 );
+ Regexp( const Regexp &r );
+ ~Regexp();
+ const Regexp & operator=( const Regexp & r );
+
+ bool Match( const char * s );
+ int SubStrings() const;
+
+ const ivy::string operator[]( size_t i ) const;
+ size_t SubStart( size_t i ) const;
+ size_t SubLength( size_t i ) const;
+
+ ivy::string GetReplaceString( const char * source ) const;
+
+ ivy::string GetErrorString() const;
+ bool CompiledOK() const;
+
+#if defined( _RE_DEBUG )
+ void Dump();
+#endif
+private:
+ const char * str; /* used to return substring offsets only */
+ mutable ivy::string m_szError;
+ regexp * rc;
+
+ void ClearErrorString() const;
+ size_t safeIndex( size_t i ) const;
+
+};
+
+