Switch to unified view

a/src/utils/smallut.h b/src/utils/smallut.h
1
#ifndef _SMALLUT_H_INCLUDED_
1
#ifndef _SMALLUT_H_INCLUDED_
2
#define _SMALLUT_H_INCLUDED_
2
#define _SMALLUT_H_INCLUDED_
3
/* @(#$Id: smallut.h,v 1.10 2005-11-25 14:36:46 dockes Exp $  (C) 2004 J.F.Dockes */
3
/* @(#$Id: smallut.h,v 1.11 2006-01-04 11:33:44 dockes Exp $  (C) 2004 J.F.Dockes */
4
#include <string>
4
#include <string>
5
#include <list>
5
#include <list>
6
6
7
#ifndef NO_NAMESPACES
7
#ifndef NO_NAMESPACES
8
using std::string;
8
using std::string;
...
...
18
18
19
extern bool maketmpdir(string& tdir);
19
extern bool maketmpdir(string& tdir);
20
extern string stringlistdisp(const list<string>& strs);
20
extern string stringlistdisp(const list<string>& strs);
21
21
22
/**
22
/**
23
 * Parse input stream into list of strings. 
23
 * Parse input string into list of strings. 
24
 *
24
 *
25
 * Token delimiter is " \t" except inside dquotes. dquote inside
25
 * Token delimiter is " \t" except inside dquotes. dquote inside
26
 * dquotes can be escaped with \ etc...
26
 * dquotes can be escaped with \ etc...
27
 */
27
 */
28
extern bool stringToStrings(const string &s, std::list<string> &tokens);
28
extern bool stringToStrings(const string &s, std::list<string> &tokens);
29
29
30
/**
31
 * Split input string. No handling of quoting
32
 */
33
extern void stringToTokens(const string &s, std::list<string> &tokens, 
34
             const string &delims = " \t");
35
36
/** Convert string to boolean */
30
extern bool stringToBool(const string &s);
37
extern bool stringToBool(const string &s);
31
38
32
/** Remove instances of characters belonging to set (default {space,
39
/** Remove instances of characters belonging to set (default {space,
33
    tab}) at beginning and end of input string */
40
    tab}) at beginning and end of input string */
34
extern void trimstring(string &s, const char *ws = " \t");
41
extern void trimstring(string &s, const char *ws = " \t");