1 #ifndef __OUC_STRING_H__
2 #define __OUC_STRING_H__
265 int adjust(
int ls,
int &j,
int &k,
int nmx = 0);
266 char *bufalloc(
int nsz);
267 inline void init() { str = 0; len = 0; siz = 0; }
270 XrdOucString(
int lmx = 0) { init();
if (lmx > 0) str = bufalloc(lmx+1); }
278 const char *
c_str()
const {
return (
const char *)str; }
282 int find(
const char c,
int start = 0,
bool forward = 1);
283 int find(
const char *s,
int start = 0);
286 {
return find(c, start, 0); }
295 int matches(
const char *s,
char wch =
'*');
301 void resize(
int lmx = 0) {
int ns = (lmx > 0) ? lmx + 1 : 0;
302 str = bufalloc(ns); }
304 void append(
const char c);
305 void append(
const char *s);
307 void assign(
const char *s,
int j,
int k = -1);
309 #if !defined(WINDOWS)
310 int form(
const char *fmt, ...);
312 int keep(
int start = 0,
int size = 0);
313 void insert(
const int i,
int start = -1);
314 void insert(
const char c,
int start = -1);
315 void insert(
const char *s,
int start = -1,
int lmx = 0);
317 int replace(
const char *s1,
const char *s2,
318 int from = 0,
int to = -1);
320 int from = 0,
int to = -1);
322 int from = 0,
int to = -1);
324 int from = 0,
int to = -1);
325 int erase(
int start = 0,
int size = 0);
326 int erase(
const char *s,
int from = 0,
int to = -1);
330 void lower(
int pos,
int size = 0);
331 void upper(
int pos,
int size = 0);
332 void reset(
const char c,
int j = 0,
int k = -1);
366 long atoi(
int from = 0,
int to = -1);
372 #if !defined(WINDOWS)
std::ostream & operator<<(std::ostream &, const XrdOucString s)
XrdOucString const operator+(const char *s1, const XrdOucString s2)
int operator!=(const int i)
int operator!=(const XrdOucString s)
void insert(const int i, int start=-1)
bool beginswith(XrdOucString s)
const char * c_str() const
int operator!=(const char *s)
void assign(const char *s, int j, int k=-1)
void upper(int pos, int size=0)
int erasefromstart(int sz=0)
bool endswith(XrdOucString s)
void setbuffer(char *buf)
int erasefromend(int sz=0)
friend XrdOucString operator+(const XrdOucString &s1, const int i)
int erase(int start=0, int size=0)
void reset(const char c, int j=0, int k=-1)
int matches(const char *s, char wch=' *')
int rfind(const char c, int start=STR_NPOS)
XrdOucString & operator+=(const int i)
int replace(const char *s1, const char *s2, int from=0, int to=-1)
int operator!=(const char c)
int find(const char c, int start=0, bool forward=1)
static void setblksize(const int bs)
bool isdigit(int from=0, int to=-1)
long atoi(int from=0, int to=-1)
int form(const char *fmt,...)
int tokenize(XrdOucString &tok, int from, char del=':')
void lower(int pos, int size=0)
XrdOucString & operator=(const int i)
int operator==(const int i)
bool beginswith(const char *s)
int keep(int start=0, int size=0)
static INT to(const char *buffer)