Subversion Repositories gelsvn

Rev

Rev 510 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 510 Rev 595
-
 
1
/* ----------------------------------------------------------------------- *
-
 
2
 * This file is part of GEL, http://www.imm.dtu.dk/GEL
-
 
3
 * Copyright (C) the authors and DTU Informatics
-
 
4
 * For license and list of authors, see ../../doc/intro.pdf
-
 
5
 * ----------------------------------------------------------------------- */
-
 
6
 
-
 
7
/**
-
 
8
 * @file string_utils.h
-
 
9
 * @brief Split a string into pieces.
-
 
10
 */
-
 
11
 
1
#ifndef __UTIL_STRING_UTILS_H
12
#ifndef __UTIL_STRING_UTILS_H
2
#define __UTIL_STRING_UTILS_H
13
#define __UTIL_STRING_UTILS_H
3
 
14
 
4
#include <string>
15
#include <string>
5
#include <list>
16
#include <list>
6
 
17
 
7
namespace Util
18
namespace Util
8
{
19
{
9
  std::string trim(const std::string& s, const std::string& wspaces);
20
  std::string trim(const std::string& s, const std::string& wspaces);
10
  std::string trim(const std::string& s);
21
  std::string trim(const std::string& s);
11
  void split(const std::string& s, std::list<std::string>& result, const std::string& delim);
22
  void split(const std::string& s, std::list<std::string>& result, const std::string& delim);
12
  void split(const std::string& s, std::list<std::string>& result);
23
  void split(const std::string& s, std::list<std::string>& result);
13
  void trim_split(const std::string& s, std::list<std::string>& result, const std::string& delim);
24
  void trim_split(const std::string& s, std::list<std::string>& result, const std::string& delim);
14
  void trim_split(const std::string& s, std::list<std::string>& result);
25
  void trim_split(const std::string& s, std::list<std::string>& result);
15
  void get_first(std::string& s, std::string& first);
26
  void get_first(std::string& s, std::string& first);
16
  void get_last(std::string& s, std::string& last);
27
  void get_last(std::string& s, std::string& last);
17
}
28
}
18
 
29
 
19
#endif // STRING_UTILS_H
30
#endif // STRING_UTILS_H
20
 
31
 
21

Generated by GNU Enscript 1.6.6.
32

Generated by GNU Enscript 1.6.6.
22
 
33
 
23
 
34
 
24
 
35