Another patch from Oliver Tappe: BString behaves better when the user supplies out-of bounds values in Insert(), Remove(), etc.

Code is refactored, and it fully complies with our guidelines.
Tests have been updated too (hint: try the replace tests with R5 and our implementation...)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5348 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2003-11-13 07:35:16 +00:00
parent 81b9c77691
commit 5480b4590e
8 changed files with 715 additions and 505 deletions
+9 -1
View File
@@ -1,5 +1,5 @@
//------------------------------------------------------------------------------
// Copyright (c) 2001-2002, OpenBeOS
// Copyright (c) 2001-2003, OpenBeOS
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
@@ -319,6 +319,14 @@ private:
void _AssertNotUsingAsCString() const {}
#endif
char *_Alloc( int32);
struct PosVect;
void _ReplaceAtPositions( const PosVect* positions,
int32 searchLen,
const char* with,
int32 withLen);
protected:
char *_privateData;
};