KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CharUtils.h
Go to the documentation of this file.
1 #ifndef CHAR_UTILS_H_
2 #define CHAR_UTILS_H_
3 
11 #include <string>
12 #include <vector>
13 
14 #include "spear/Wide.h"
15 
16 namespace spear {
17 
18  bool compareWideCharToWideChar(const Char * s1,
19  const Char * s2);
20 
21  void simpleTokenize(const String & input,
22  std::vector<String> & output,
23  const String & separators);
24 
29  void tokenizeWithQuotes(const String & input,
30  std::vector<String> & output,
31  const String & separators);
32 
37  String quotify(const String & str);
38 
39  int toInteger(const String & s);
40 
42  bool isNumber(const String & s);
43 
45  bool isNumberRange(const String & s);
46 
47  String toUpper(const String & s);
48 
49  String toLower(const String & s);
50 
55  bool expandNumber(const String & number,
56  std::vector<String> & expansion);
57 
58  String mergeStrings(const String & s1,
59  const String & s2);
60 
61  String mergeStrings(const String & s1,
62  const String & s2,
63  const String & s3);
64 
65  String mergeStrings(const String & s1,
66  const String & s2,
67  const String & s3,
68  const String & s4);
69 
70  bool startsWith(const String & big,
71  const String & small);
72 
73  bool endsWith(const String & big,
74  const String & small);
75 
76  String stripString(const String & s,
77  int left,
78  int right);
79 
80 } // end namespace spear
81 
82 #endif
83 
String stripString(const String &s, int left, int right)
Definition: CharUtils.cc:639
bool compareWideCharToWideChar(const Char *s1, const Char *s2)
Definition: CharUtils.cc:37
int toInteger(const String &s)
Definition: CharUtils.cc:74
String toLower(const String &s)
Definition: CharUtils.cc:318
bool startsWith(const String &big, const String &small)
Definition: CharUtils.cc:43
String quotify(const String &str)
Definition: CharUtils.cc:165
char Char
Definition: Wide.h:34
void simpleTokenize(const String &input, std::vector< String > &output, const String &separators)
Definition: CharUtils.cc:84
String mergeStrings(const String &s1, const String &s2)
Definition: CharUtils.cc:612
bool isNumber(const String &s)
Definition: CharUtils.cc:210
void tokenizeWithQuotes(const String &input, std::vector< String > &output, const String &separators)
Definition: CharUtils.cc:114
String toUpper(const String &s)
Definition: CharUtils.cc:307
bool isNumberRange(const String &s)
Definition: CharUtils.cc:176
#define String
Definition: Wide.h:36
bool endsWith(const String &big, const String &small)
Definition: CharUtils.cc:57
bool expandNumber(const String &number, std::vector< String > &expansion)
Definition: CharUtils.cc:570