aboutsummaryrefslogtreecommitdiff
path: root/common/str.h
diff options
context:
space:
mode:
authorStephen Kennedy2008-07-22 00:15:13 +0000
committerStephen Kennedy2008-07-22 00:15:13 +0000
commit0861fa4c00f0ecb82f3607127c8278d55f95376c (patch)
treed757c116b163a401f00859503a7db755b6627504 /common/str.h
parenta58080bd58bbcc9f7c710fade55620049bae14e4 (diff)
parente09eb75ef77d6e76b763b3a47540a530013a887f (diff)
downloadscummvm-rg350-0861fa4c00f0ecb82f3607127c8278d55f95376c.tar.gz
scummvm-rg350-0861fa4c00f0ecb82f3607127c8278d55f95376c.tar.bz2
scummvm-rg350-0861fa4c00f0ecb82f3607127c8278d55f95376c.zip
Merged revisions 32879,32883,32895,32899,32902-32904,32910-32912,32923-32924,32930-32931,32938,32940,32948-32949,32951,32960-32964,32966-32970,32972-32974,32976,32978,32983,32986-32990,32992,32994,33002-33004,33006-33007,33009-33010,33014,33017,33021-33023,33030,33033,33052-33053,33056-33058,33061-33064,33068,33070,33072,33075,33078-33079,33083,33086-33087,33089,33094-33096,33098-33099,33104,33108-33109,33114-33117,33120,33135-33146,33160,33162,33165,33167-33169 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk svn-id: r33185
Diffstat (limited to 'common/str.h')
-rw-r--r--common/str.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/common/str.h b/common/str.h
index a92ec34fff..ae9cb992b6 100644
--- a/common/str.h
+++ b/common/str.h
@@ -96,10 +96,24 @@ public:
static const char *emptyString;
#endif
+ /** Construct a new empty string. */
String() : _len(0), _str(_storage) { _storage[0] = 0; }
- String(const char *str, uint32 len = 0);
+
+ /** Construct a new string from the given NULL-terminated C string. */
+ String(const char *str);
+
+ /** Construct a new string containing exactly len characters read from address str. */
+ String(const char *str, uint32 len);
+
+ /** Construct a new string containing the characters between beginP (including) and endP (excluding). */
+ String(const char *beginP, const char *endP);
+
+ /** Construct a copy of the given string. */
String(const String &str);
+
+ /** Construct a string consisting of the given character. */
String(char c);
+
~String();
String &operator =(const char *str);
@@ -162,7 +176,7 @@ public:
void toLowercase();
void toUppercase();
-
+
uint hash() const;
public:
@@ -189,6 +203,7 @@ protected:
void ensureCapacity(uint32 new_len, bool keep_old);
void incRefCount() const;
void decRefCount(int *oldRefCount);
+ void initWithCStr(const char *str, uint32 len);
};
// Append two strings to form a new (temp) string