public class StringBuffer
extends Object
GDK enhancements for StringBuffer.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public int |
getLength()Provides a getLength alias for length for StringBuffer,
supporting assignment arithmetic operator expressions involving
the otherwise write-only length property. |
|
public StringBuffer |
leftShift(Object value)Overloads the left shift operator to provide an easy way to append multiple objects as string representations to a StringBuffer. |
|
public String |
plus(String right)Appends a String to this StringBuffer. |
|
public void |
putAt(EmptyRange range, Object value)Supports the range subscript operator for StringBuffer. |
|
public void |
putAt(IntRange range, Object value)Supports the range subscript operator for StringBuffer. |
| Methods inherited from class | Name |
|---|---|
class Object |
addShutdownHook, any, any, asBoolean, asType, collect, collect, collect, dump, each, eachMatch, eachMatch, eachWithIndex, every, every, find, find, findAll, findAll, findIndexOf, findIndexOf, findIndexValues, findIndexValues, findLastIndexOf, findLastIndexOf, findResult, findResult, findResult, findResult, getAt, getMetaClass, getMetaPropertyValues, getProperties, grep, grep, hasProperty, identity, inject, inject, inspect, invokeMethod, is, isCase, isNotCase, iterator, metaClass, print, print, printf, printf, println, println, println, putAt, respondsTo, respondsTo, setMetaClass, sleep, sleep, split, sprintf, sprintf, stream, tap, toString, use, use, use, with, with, withCloseable, withCloseable, withMethodClosure, withStream, withStream, withTraits |
Provides a getLength alias for length for StringBuffer,
supporting assignment arithmetic operator expressions involving
the otherwise write-only length property.
def sb = new StringBuffer()
sb << 'foobar'
sb.length -= 3
assert sb.toString() == 'foo'
Overloads the left shift operator to provide an easy way to append multiple objects as string representations to a StringBuffer.
value - a value to appendAppends a String to this StringBuffer.
right - a StringSupports the range subscript operator for StringBuffer.
range - a Rangevalue - the object that's toString() will be inserted