本文整理匯總了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;
//.........這裏部分代碼省略.........