18 #ifndef __UTIL_BASESTRING_HPP_INCLUDED__
19 #define __UTIL_BASESTRING_HPP_INCLUDED__
21 #include <ndb_global.h>
22 #include <util/Vector.hpp>
23 #include "Bitmask.hpp"
47 const char*
c_str()
const;
107 ATTRIBUTE_FORMAT(printf, 2, 3);
111 ATTRIBUTE_FORMAT(printf, 2, 3);
130 int maxSize = -1)
const;
184 static char**
argify(
const char *argv0,
const char *src);
189 static char*
trim(
char * src,
const char * delim);
194 static int snprintf(
char *str,
size_t size,
const char *format, ...)
195 ATTRIBUTE_FORMAT(printf, 3, 4);
196 static int vsnprintf(
char *str,
size_t size,
const char *format, va_list ap);
198 template<
unsigned size>
200 return BaseString::getText(size, mask.rep.data);
203 template<
unsigned size>
205 return BaseString::getPrettyText(size, mask.rep.data);
207 template<
unsigned size>
209 return BaseString::getPrettyTextShort(size, mask.rep.data);
212 template<
unsigned size>
214 return BaseString::getText(size, mask.rep.data);
217 template<
unsigned size>
219 return BaseString::getPrettyText(size, mask.rep.data);
221 template<
unsigned size>
223 return BaseString::getPrettyTextShort(size, mask.rep.data);
226 static BaseString getText(
unsigned size,
const Uint32 data[]);
227 static BaseString getPrettyText(
unsigned size,
const Uint32 data[]);
228 static BaseString getPrettyTextShort(
unsigned size,
const Uint32 data[]);
266 m_chr[
i] = toupper(m_chr[
i]);
273 m_chr[
i] = tolower(m_chr[
i]);
280 return strcmp(m_chr, str.m_chr) < 0;
286 return strcmp(m_chr, str.m_chr) == 0;
292 return strcmp(m_chr, str) == 0;
298 return strcmp(m_chr, str.m_chr) != 0;
304 return strcmp(m_chr, str) != 0;
310 return str.m_chr == NULL;
323 return append(vector, separator);
330 const void * BaseString_get_key(
const void* key,
size_t* key_length);