1 #ifndef __OUC_STRING_H__
2 #define __OUC_STRING_H__
249 int adjust(
int ls,
int &j,
int &k,
int nmx = 0);
250 char *bufalloc(
int nsz);
251 inline void init() { str = 0; len = 0; siz = 0; }
254 XrdOucString(
int lmx = 0) { init();
if (lmx > 0) str = bufalloc(lmx+1); }
262 const char *
c_str()
const {
return (
const char *)str; }
265 char &operator[](
int j);
266 int find(
const char c,
int start = 0,
bool forward = 1);
267 int find(
const char *s,
int start = 0);
270 {
return find(c, start, 0); }
271 int rfind(
const char *s,
int start =
STR_NPOS);
276 bool endswith(
char c);
277 bool endswith(
const char *s);
279 int matches(
const char *s,
char wch =
'*');
282 int tokenize(
XrdOucString &tok,
int from,
char del =
':');
285 void resize(
int lmx = 0) {
int ns = (lmx > 0) ? lmx + 1 : 0;
286 str = bufalloc(ns); }
287 void append(
const int i);
288 void append(
const char c);
289 void append(
const char *s);
291 void assign(
const char *s,
int j,
int k = -1);
293 #if !defined(WINDOWS)
294 int form(
const char *fmt, ...);
296 int keep(
int start = 0,
int size = 0);
297 void insert(
const int i,
int start = -1);
298 void insert(
const char c,
int start = -1);
299 void insert(
const char *s,
int start = -1,
int lmx = 0);
301 int replace(
const char *s1,
const char *s2,
302 int from = 0,
int to = -1);
304 int from = 0,
int to = -1);
306 int from = 0,
int to = -1);
308 int from = 0,
int to = -1);
309 int erase(
int start = 0,
int size = 0);
310 int erase(
const char *s,
int from = 0,
int to = -1);
314 void lower(
int pos,
int size = 0);
315 void upper(
int pos,
int size = 0);
316 void reset(
const char c,
int j = 0,
int k = -1);
318 void setbuffer(
char *buf);
337 int operator==(
const int i);
338 int operator==(
const char c);
339 int operator==(
const char *s);
349 bool isdigit(
int from = 0,
int to = -1);
350 long atoi(
int from = 0,
int to = -1);
353 static int getblksize();
354 static void setblksize(
const int bs);
356 #if !defined(WINDOWS)
358 static int form(
XrdOucString &str,
const char *fmt, ...);