本文整理汇总了C#中StringBuffer.append方法的典型用法代码示例。如果您正苦于以下问题:C# StringBuffer.append方法的具体用法?C# StringBuffer.append怎么用?C# StringBuffer.append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringBuffer
的用法示例。
在下文中一共展示了StringBuffer.append方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Method
public void Method()
{
String text;
StringBuffer buff = new StringBuffer();
buff.append(text);
}
示例2: ToString
public override String ToString()
{
StringBuffer result = new StringBuffer();
foreach (Pair<Variable, Domain> pair in savedDomains)
result.append(pair.getFirst() + "=" + pair.getSecond() + " ");
if (emptyDomainObserved)
result.append("!");
return result.ToString();
}
示例3: generateRandomIndividual
public String generateRandomIndividual(int boardSize)
{
StringBuffer ind = new StringBuffer();
assert(boardSize >= Character.MIN_RADIX && boardSize <= Character.MAX_RADIX);
for (int i = 0; i < boardSize; i++)
{
ind.append(Character.forDigit(new Random().nextInt(boardSize),
boardSize));
}
return ind.ToString();
}
示例4: ToString
public override String ToString()
{
StringBuffer buf = new StringBuffer();
for (int row = 0; row < size; row++)
{ // rows
for (int col = 0; col < size; col++)
{ // columns
if (queenExistsAt(col, row))
buf.append('Q');
else
buf.append('-');
}
buf.append("\n");
}
return buf.ToString();
}
示例5: getBoardPic
public String getBoardPic()
{
StringBuffer buffer = new StringBuffer();
for (int row = 0; (row < size); row++)
{ // row
for (int col = 0; (col < size); col++)
{ // col
if (queenExistsAt(col, row))
buffer.append(" Q ");
else
buffer.append(" - ");
}
buffer.append("\n");
}
return buffer.ToString();
}
示例6: ToString
public override String ToString()
{
bool comma = false;
StringBuffer result = new StringBuffer("{");
foreach (Variable var in variables)
{
if (comma)
result.append(", ");
result.append(var + "=" + variableToValue.get(var));
comma = true;
}
result.append("}");
return result.ToString();
}
示例7: ToString
public override String ToString() {
StringBuffer buf = new StringBuffer();
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++)
buf.append(getValue(i, j) + " ");
buf.append("\n");
}
return buf.ToString();
}
示例8: PredicatesToString
public String PredicatesToString()
{
if ( semanticContext==NFAConfiguration.DEFAULT_CLAUSE_SEMANTIC_CONTEXT ) {
return "!other preds";
}
StringBuffer buf = new StringBuffer();
Iterator iter = semanticContext.iterator();
while (iter.hasNext()) {
AST predAST = (AST) iter.next();
buf.append(predAST.getText());
if ( iter.hasNext() ) {
buf.append("&");
}
}
return buf.toString();
}