summaryrefslogtreecommitdiff
path: root/src/staticstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/staticstring.cpp')
-rw-r--r--src/staticstring.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/staticstring.cpp b/src/staticstring.cpp
index 24b9ecb..fa61e62 100644
--- a/src/staticstring.cpp
+++ b/src/staticstring.cpp
@@ -198,3 +198,30 @@ void StaticString::serialize( Serializer &ar )
198 } 198 }
199} 199}
200 200
201bool StaticString::operator==( const char *str )
202{
203 const char *a = str, *b = lpStr;
204 for(; *a == *b; a++, b++ ) if( *a == '\0' && *b == '\0' ) return true;
205 return false;
206}
207
208bool StaticString::operator==( StaticString &str )
209{
210 const char *a = str.lpStr, *b = lpStr;
211 for(; *a == *b; a++, b++ ) if( *a == '\0' && *b == '\0' ) return true;
212 return false;
213}
214
215bool StaticString::operator!=( const char *str )
216{
217 const char *a = str, *b = lpStr;
218 for(; *a == *b; a++, b++ ) if( *a == '\0' && *b == '\0' ) return false;
219 return true;
220}
221
222bool StaticString::operator!=( StaticString &str )
223{
224 const char *a = str.lpStr, *b = lpStr;
225 for(; *a == *b; a++, b++ ) if( *a == '\0' && *b == '\0' ) return false;
226 return true;
227}