diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-03-20 23:13:52 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-03-20 23:13:52 +0000 |
commit | 50dd460655e0ab563de388bad37d3f678ffbb3b4 (patch) | |
tree | fe79c205433e2de48095d81e2a03fb5f9ffca078 /src/fstring.h | |
parent | 2b8255fabce194b35f7b2a350fd08f43d1e698a6 (diff) | |
download | libbu++-50dd460655e0ab563de388bad37d3f678ffbb3b4.tar.gz libbu++-50dd460655e0ab563de388bad37d3f678ffbb3b4.tar.bz2 libbu++-50dd460655e0ab563de388bad37d3f678ffbb3b4.tar.xz libbu++-50dd460655e0ab563de388bad37d3f678ffbb3b4.zip |
Minor updates to the Hash and FString, Hash got a getKeys function, and FString
got the more normal getStr and getSize functions.
Diffstat (limited to '')
-rw-r--r-- | src/fstring.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/fstring.h b/src/fstring.h index 2f508b7..c3ab6cd 100644 --- a/src/fstring.h +++ b/src/fstring.h | |||
@@ -143,6 +143,29 @@ public: | |||
143 | nLength = nNewSize; | 143 | nLength = nNewSize; |
144 | } | 144 | } |
145 | 145 | ||
146 | long getSize() | ||
147 | { | ||
148 | return nLength; | ||
149 | } | ||
150 | |||
151 | chr *getStr() | ||
152 | { | ||
153 | if( pFirst == NULL ) | ||
154 | return NULL; | ||
155 | |||
156 | flatten(); | ||
157 | return pFirst->pData; | ||
158 | } | ||
159 | |||
160 | const chr *getStr() const | ||
161 | { | ||
162 | if( pFirst == NULL ) | ||
163 | return NULL; | ||
164 | |||
165 | flatten(); | ||
166 | return pFirst->pData; | ||
167 | } | ||
168 | |||
146 | chr *c_str() | 169 | chr *c_str() |
147 | { | 170 | { |
148 | if( pFirst == NULL ) | 171 | if( pFirst == NULL ) |