DBG: StringList typedef
This commit is contained in:
parent
52512b8af5
commit
8aa848b467
|
@ -3,7 +3,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
std::vector<String> StringUtils::Split(const String & s, char delim, std::vector<String> & elems)
|
StringList StringUtils::Split(const String & s, char delim, std::vector<String> & elems)
|
||||||
{
|
{
|
||||||
std::stringstream ss(s);
|
std::stringstream ss(s);
|
||||||
String item;
|
String item;
|
||||||
|
@ -16,7 +16,7 @@ std::vector<String> StringUtils::Split(const String & s, char delim, std::vector
|
||||||
return elems;
|
return elems;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<String> StringUtils::Split(const String & s, char delim)
|
StringList StringUtils::Split(const String & s, char delim)
|
||||||
{
|
{
|
||||||
std::vector<String> elems;
|
std::vector<String> elems;
|
||||||
Split(s, delim, elems);
|
Split(s, delim, elems);
|
||||||
|
|
|
@ -6,12 +6,14 @@
|
||||||
|
|
||||||
typedef std::string String;
|
typedef std::string String;
|
||||||
typedef std::wstring WString;
|
typedef std::wstring WString;
|
||||||
|
typedef std::vector<String> StringList;
|
||||||
|
typedef std::vector<WString> WStringList;
|
||||||
|
|
||||||
class StringUtils
|
class StringUtils
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static std::vector<String> Split(const String & s, char delim, std::vector<String> & elems);
|
static StringList Split(const String & s, char delim, std::vector<String> & elems);
|
||||||
static std::vector<String> Split(const String & s, char delim);
|
static StringList Split(const String & s, char delim);
|
||||||
static String Trim(const String & s);
|
static String Trim(const String & s);
|
||||||
static String TrimLeft(const String & s);
|
static String TrimLeft(const String & s);
|
||||||
static String TrimRight(const String & s);
|
static String TrimRight(const String & s);
|
||||||
|
|
Loading…
Reference in New Issue