aboutsummaryrefslogtreecommitdiff
path: root/src/fstring.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fstring.h')
-rw-r--r--src/fstring.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/fstring.h b/src/fstring.h
index 0184301..751beb8 100644
--- a/src/fstring.h
+++ b/src/fstring.h
@@ -364,6 +364,30 @@ namespace Bu
364 } 364 }
365 } 365 }
366 366
367 long find( const char *sText )
368 {
369 long nTLen = strlen( sText );
370 flatten();
371 for( long j = 0; j < pFirst->nLength-nTLen; j++ )
372 {
373 if( !strncmp( sText, pFirst->pData+j, nTLen ) )
374 return j;
375 }
376 return -1;
377 }
378
379 long rfind( const char *sText )
380 {
381 long nTLen = strlen( sText );
382 flatten();
383 for( long j = pFirst->nLength-nTLen-1; j >= 0; j-- )
384 {
385 if( !strncmp( sText, pFirst->pData+j, nTLen ) )
386 return j;
387 }
388 return -1;
389 }
390
367 void archive( class Archive &ar ) 391 void archive( class Archive &ar )
368 { 392 {
369 if( ar.isLoading() ) 393 if( ar.isLoading() )