~ubuntu-branches/ubuntu/maverick/codelite/maverick

« back to all changes in this revision

Viewing changes to sdk/codelite_indexer/utils.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-07-29 19:42:47 UTC
  • mfrom: (1.1.9 upstream) (18.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20100729194247-cuibfk03wog33nxq
Tags: 2.6.0.4189~dfsg-1
* New upstream release.
* Bump Standards.
* Refresh patches.
* Add license information about files under ./Debugger/

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
#include <vector>
5
5
#include <string>
6
 
/**
7
 
 * helper string methods
8
 
 */
9
 
 
10
 
/**
11
 
 * @brief return the string before the first occurance of 'c'
12
 
 * @param s input string
13
 
 * @param c delimiter char
14
 
 * @return string or the entire 's' string of 'c' is not found
15
 
 */
16
 
std::string before_first(const std::string &s, char c);
17
 
 
18
 
/**
19
 
 * @brief return string after the first occurance of 'c'
20
 
 * @param s input string
21
 
 * @param c delimiter char
22
 
 * @return string or empty string if 'c' is not found
23
 
 */
24
 
std::string after_first(const std::string &s, char c);
25
 
 
26
 
/**
27
 
 * @brief return true if s starts with prefix, false otherwise
28
 
 */
29
 
bool starts_with(const std::string &s, const std::string &prefix);
30
 
 
31
 
/**
32
 
 * @brief return true if s starts with prefix, false otherwise
33
 
 */
34
 
bool ends_with(const std::string &s, const std::string &suffix, std::string &rest);
35
6
 
36
7
/**
37
8
 * @brief remove whitespaces from string
47
18
 */
48
19
std::vector<std::string> string_tokenize(const std::string &str, const std::string& delimiter);
49
20
 
50
 
/**
51
 
 * @brief Gets all characters before the last occurrence of c. Returns the empty string if c is not found
52
 
 */
53
 
std::string before_last(const std::string &str, char c);
54
 
 
55
 
/**
56
 
 * @brief Gets all the characters after the last occurrence of c. Returns the whole string if c is not found.
57
 
 */
58
 
std::string after_last(const std::string &str, char c);
59
 
 
60
21
//------------------------------------------------------------
61
22
// process methods
62
23
//------------------------------------------------------------