本文整理汇总了C++中XString::stripWhiteSpace方法的典型用法代码示例。如果您正苦于以下问题:C++ XString::stripWhiteSpace方法的具体用法?C++ XString::stripWhiteSpace怎么用?C++ XString::stripWhiteSpace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XString
的用法示例。
在下文中一共展示了XString::stripWhiteSpace方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: atoi
char *prepareSourceCodeDefinition(const char *acFile, const char *acText, bool bForm)
{
XString sText;
sText = acText; sText = sText.replace("\r", "");
int n = 0;
XString sSQLName = "";
XString sSQLControls = "";
XString sAdditonalCode = "";
XString sAdditional = "";
int nBorderLeft = 0;
int nBorderRight = 0;
int nBorderTop = 0;
int nBorderBottom = 0;
int nHeight = 0;
n = sText.find("Height = ");
if (n >= 0){
n += 9;
int n2 = sText.find("\n", n);
nHeight = atoi(sText.mid(n, n2 - n).ascii());
}
n = sText.find("BorderLeft = ");
if (n >= 0){
n += 13;
int n2 = sText.find("\n", n);
nBorderLeft = atoi(sText.mid(n, n2 - n).ascii());
}
n = sText.find("BorderRight = ");
if (n >= 0){
n += 14;
int n2 = sText.find("\n", n);
nBorderRight = atoi(sText.mid(n, n2 - n).ascii());
}
n = sText.find("BorderTop = ");
if (n >= 0){
n += 12;
int n2 = sText.find("\n", n);
nBorderTop = atoi(sText.mid(n, n2 - n).ascii());
}
n = sText.find("BorderBottom = ");
if (n >= 0){
n += 15;
int n2 = sText.find("\n", n);
nBorderBottom = atoi(sText.mid(n, n2 - n).ascii());
}
n = sText.find("SQLControls = \"");
if (n >= 0){
n += 15;
int n2 = sText.find("\"", n);
sSQLControls = sText.mid(n, n2 - n);
}
n = sText.find("SQLName = \"");
if (n >= 0){
n += 11;
int n2 = sText.find("\"", n);
sSQLName = sText.mid(n, n2 - n);
}
n = 0;
n++;
static XString sDefinition;
sDefinition = "";
XString sConstructor = "";
sDefinition += "\n";
do {
n = sText.find("Begin ", n);
if (n == -1) break;
int n2 = sText.find("\n", n);
n += 6;
XString sLine = sText.mid(n, n2 - n);
int n3 = sLine.find(" ");
XString sType = sLine.mid(0, n3);
XString sName = sLine.mid(n3 + 1);
sName = sName.stripWhiteSpace();
sDefinition += "Public ";
sDefinition += sName;
sDefinition += " As ";
sDefinition += sType;
sDefinition += "\n";
sConstructor += sName;
//.........这里部分代码省略.........