本文整理了Java中java.lang.StringBuffer.subSequence()
方法的一些代码示例,展示了StringBuffer.subSequence()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。StringBuffer.subSequence()
方法的具体详情如下:
包路径:java.lang.StringBuffer
类名称:StringBuffer
方法名:subSequence
暂无
代码示例来源:origin: geoserver/geoserver
/**
* writeln purpose.
*
* <p>Writes the String specified to the stored output writer.
*
* @param s The String to write.
* @throws ConfigurationException When an IO exception occurs.
*/
public void writeln(String s) throws ConfigurationException {
try {
writer.write(indentBuffer.subSequence(0, indent) + s + "\n");
writer.flush();
} catch (IOException e) {
throw new ConfigurationException("Writeln" + writer, e);
}
}
代码示例来源:origin: plantuml/plantuml
public TextGrid getSubGrid(int x, int y, int width, int height){
TextGrid grid = new TextGrid(width, height);
for(int i = 0; i < height; i++){
grid.setRow(i, new StringBuffer(getRow(y + i).subSequence(x, x + width)));
}
return grid;
}
代码示例来源:origin: apache/tika
/**
* Constructs a new NGramEntry
*
* @param seq is the sequence of characters of the ngram
* @param count is the number of occurrences of this ngram
*/
public NGramEntry(String seq, int count) {
this.seq = new StringBuffer(seq).subSequence(0, seq.length());
this.count = count;
}
代码示例来源:origin: apache/tika
/**
* @param word
* @param n sequence length
*/
private void add(StringBuffer word, int n) {
for (int i = 0; i <= word.length() - n; i++) {
add(word.subSequence(i, i + n));
}
}
代码示例来源:origin: geotools/geotools
if (orderByIndex > 0 && orderByIndex > lastClosed) {
orderBy = sql.subSequence(orderByIndex, sql.length());
sql.delete(orderByIndex, orderByIndex + orderBy.length());
} else {
代码示例来源:origin: org.threadly/threadly
@Override
public CharSequence subSequence(int start, int end) {
return sb.subSequence(start, end);
}
}
代码示例来源:origin: threadly/threadly
@Override
public CharSequence subSequence(int start, int end) {
return sb.subSequence(start, end);
}
}
代码示例来源:origin: org.opencypher/grammar
@Override
public CharSequence subSequence( int start, int end )
{
return output.subSequence( start, end );
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
/**
* @since 3.12
*/
@Override
public CharSequence subSequence(int start, int end) {
return fBuffer.subSequence(start, end);
}
代码示例来源:origin: org.apache.tika/tika-core
/**
* Constructs a new NGramEntry
*
* @param seq is the sequence of characters of the ngram
* @param count is the number of occurrences of this ngram
*/
public NGramEntry(String seq, int count) {
this.seq = new StringBuffer(seq).subSequence(0, seq.length());
this.count = count;
}
代码示例来源:origin: com.github.lafa.tikaNoExternal/tika-core
/**
* Constructs a new NGramEntry
*
* @param seq is the sequence of characters of the ngram
* @param count is the number of occurrences of this ngram
*/
public NGramEntry(String seq, int count) {
this.seq = new StringBuffer(seq).subSequence(0, seq.length());
this.count = count;
}
代码示例来源:origin: Jawf/DataX-Migration
private CharSequence getColumnsString(List<String> columns) {
StringBuffer stb = new StringBuffer();
for (String s : columns) {
stb.append("\"");
stb.append(s);
stb.append("\",");
}
return stb.subSequence(0, stb.length() - 1);
}
代码示例来源:origin: org.apache.tika/tika-core
/**
* @param word
* @param n sequence length
*/
private void add(StringBuffer word, int n) {
for (int i = 0; i <= word.length() - n; i++) {
add(word.subSequence(i, i + n));
}
}
代码示例来源:origin: com.github.lafa.tikaNoExternal/tika-core
/**
* @param word
* @param n sequence length
*/
private void add(StringBuffer word, int n) {
for (int i = 0; i <= word.length() - n; i++) {
add(word.subSequence(i, i + n));
}
}
代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls
@Override
public CharSequence subSequence(int start, int end) {
return buffer().subSequence(start, end);
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
@Override
public CharSequence subSequence(int start, int end) {
return buffer().subSequence(start, end);
}
代码示例来源:origin: apache/cxf
private void writePayload(StringBuilder builder, StringWriter stringWriter, LogEvent event) {
StringBuffer buffer = stringWriter.getBuffer();
if (buffer.length() > lim) {
builder.append(buffer.subSequence(0, lim));
event.setTruncated(true);
} else {
builder.append(buffer);
event.setTruncated(false);
}
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-features-logging
private void writePayload(StringBuilder builder, StringWriter stringWriter, LogEvent event) {
StringBuffer buffer = stringWriter.getBuffer();
if (buffer.length() > lim) {
builder.append(buffer.subSequence(0, lim));
event.setTruncated(true);
} else {
builder.append(buffer);
event.setTruncated(false);
}
}
}
代码示例来源:origin: net.sourceforge.plantuml/plantuml
public TextGrid getSubGrid(int x, int y, int width, int height){
TextGrid grid = new TextGrid(width, height);
for(int i = 0; i < height; i++){
grid.setRow(i, new StringBuffer(getRow(y + i).subSequence(x, x + width)));
}
return grid;
}
代码示例来源:origin: threadly/threadly
@Test
public void subSequenceTest() {
sb.append("0123456789");
for (int i = 2; i < sb.length(); i++) {
assertEquals(sb.subSequence(1, i), sbw.subSequence(1, i));
}
}
}
内容来源于网络,如有侵权,请联系作者删除!