Tianchi
v0.0.2 build 20130701
C++ library for Qt with VC & mingW
首页
命名空间
类
文件
文件列表
文件成员
include
tianchi
core
tcstring.h
1
// **************************************************************************
2
// Tianchi C++ library for Qt (open source)
3
// 天池共享源码库
4
// 版权所有 (C) 天池共享源码库开发组
5
// 授权协议:请阅读天池共享源码库附带的授权协议
6
// **************************************************************************
7
// 文档说明:字符串功能增强与扩展
8
// ==========================================================================
9
// 开发日志:
10
// 日期 人员 说明
11
// --------------------------------------------------------------------------
12
// 2013.04.16 圣域天子 建立
13
//
14
// ==========================================================================
16
#ifndef TIANCHI_TCSTRING_H
17
#define TIANCHI_TCSTRING_H
18
19
#include <tianchi/tcglobal.h>
20
21
#include <QString>
22
#include <QStringList>
23
27
class
TIANCHI_API
TcString
28
{
29
public
:
30
TcString
();
31
37
static
QByteArray first(QByteArray& str,
const
QByteArray& split=
"\t"
);
38
42
static
int
find(
const
QStringList& ss,
const
QString& s);
43
47
static
int
findOf(
const
QStringList& list,
const
QString& key);
48
54
static
bool
filter(
const
QString& findText,
const
QStringList& filters);
55
60
static
QString getTextByIndex(
const
char
* strings,
int
index);
61
63
static
int
splitHumanName(QString full, QString& sur, QString& real, QString& english);
64
65
};
66
70
class
TIANCHI_API
TcStringList
:
public
QStringList
71
{
72
public
:
73
TcStringList
();
77
bool
loadFrom(
const
QString& fileName);
81
bool
saveTo(
const
QString& fileName);
82
84
inline
QString lineBreak()
const
85
{
86
return
m_lineBreak;
87
}
89
inline
void
lineBreak(
const
QString& value)
90
{
91
m_lineBreak = value;
92
}
93
94
private
:
95
QString m_lineBreak;
96
};
97
98
#endif // TIANCHI_STRING_H
生成于 2013年 七月 1日 星期一 16:50:31 , 为 Tianchi使用
1.8.3.1