diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-01-20 18:21:03 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-01-20 18:21:03 +0000 |
commit | c435c7daa9df1b08dc85132fcd1c154bea9b69e2 (patch) | |
tree | 5537f3c91a67b35c4c8aa918b708b7e4aad8f146 /src/functionregex.cpp | |
parent | 59690513123de8904eef2a03fe7fcaaed98b1b7b (diff) | |
download | build-c435c7daa9df1b08dc85132fcd1c154bea9b69e2.tar.gz build-c435c7daa9df1b08dc85132fcd1c154bea9b69e2.tar.bz2 build-c435c7daa9df1b08dc85132fcd1c154bea9b69e2.tar.xz build-c435c7daa9df1b08dc85132fcd1c154bea9b69e2.zip |
Fixes to use libbu++ Bu::String
Diffstat (limited to 'src/functionregex.cpp')
-rw-r--r-- | src/functionregex.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/functionregex.cpp b/src/functionregex.cpp index f0abc35..c80f527 100644 --- a/src/functionregex.cpp +++ b/src/functionregex.cpp | |||
@@ -13,7 +13,7 @@ FunctionRegEx::~FunctionRegEx() | |||
13 | { | 13 | { |
14 | } | 14 | } |
15 | 15 | ||
16 | Bu::FString FunctionRegEx::getName() const | 16 | Bu::String FunctionRegEx::getName() const |
17 | { | 17 | { |
18 | return "regex"; | 18 | return "regex"; |
19 | } | 19 | } |
@@ -47,7 +47,7 @@ Variable FunctionRegEx::call( Variable &input, VarList lParams ) | |||
47 | else if( lParams.getSize() == 2 ) | 47 | else if( lParams.getSize() == 2 ) |
48 | { | 48 | { |
49 | Bu::RegEx re( lParams.first().getString() ); | 49 | Bu::RegEx re( lParams.first().getString() ); |
50 | Bu::FString sPat = lParams.last().getString(); | 50 | Bu::String sPat = lParams.last().getString(); |
51 | switch( input.getType() ) | 51 | switch( input.getType() ) |
52 | { | 52 | { |
53 | case Variable::typeString: | 53 | case Variable::typeString: |
@@ -83,10 +83,10 @@ Variable FunctionRegEx::call( Variable &input, VarList lParams ) | |||
83 | "regex does not work on non-string or non-list types."); | 83 | "regex does not work on non-string or non-list types."); |
84 | } | 84 | } |
85 | 85 | ||
86 | Bu::FString FunctionRegEx::replace( Bu::RegEx &re, const Bu::FString &sSrc, | 86 | Bu::String FunctionRegEx::replace( Bu::RegEx &re, const Bu::String &sSrc, |
87 | const Bu::FString &sPat ) | 87 | const Bu::String &sPat ) |
88 | { | 88 | { |
89 | Bu::FString sOut; | 89 | Bu::String sOut; |
90 | 90 | ||
91 | int iStart, iEnd; | 91 | int iStart, iEnd; |
92 | re.getSubStringRange( 0, iStart, iEnd ); // Get the range of the full match | 92 | re.getSubStringRange( 0, iStart, iEnd ); // Get the range of the full match |
@@ -94,7 +94,7 @@ Bu::FString FunctionRegEx::replace( Bu::RegEx &re, const Bu::FString &sSrc, | |||
94 | if( iStart > 0 ) | 94 | if( iStart > 0 ) |
95 | sOut.append( sSrc, 0, iStart ); | 95 | sOut.append( sSrc, 0, iStart ); |
96 | 96 | ||
97 | for( Bu::FString::const_iterator i = sPat.begin(); i; i++ ) | 97 | for( Bu::String::const_iterator i = sPat.begin(); i; i++ ) |
98 | { | 98 | { |
99 | if( *i == '\\' ) | 99 | if( *i == '\\' ) |
100 | { | 100 | { |