MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / toString

Method toString

vm/JavaAPI/src/java/lang/StringBuffer.java:325–327  ·  view source on GitHub ↗

Converts to a string representing the data in this string buffer. A new String object is allocated and initialized to contain the character sequence currently represented by this string buffer. This String is then returned. Subsequent changes to the string buffer do not affect the contents of the St

()

Source from the content-addressed store, hash-verified

323 * Implementation advice: This method can be coded so as to create a new String object without allocating new memory to hold a copy of the character sequence. Instead, the string can share the memory used by the string buffer. Any subsequent operation that alters the content or capacity of the string buffer must then make a copy of the internal buffer at that time. This strategy is effective for reducing the amount of memory allocated by a string concatenation operation when it is implemented using a string buffer.
324 */
325 public java.lang.String toString(){
326 return internal.toString();
327 }
328
329 public StringBuffer StringBuffer(java.lang.CharSequence cs) {
330 return new StringBuffer(cs.toString());

Callers 15

readResponseMethod · 0.95
toStringMethod · 0.95
nextMethod · 0.95
stripQuotesMethod · 0.95
printMethod · 0.95
quoteMethod · 0.95
toStringMethod · 0.95
substMethod · 0.95
bracketMethod · 0.95
getValueMethod · 0.95
getTextMethod · 0.95

Calls 1

toStringMethod · 0.65

Tested by 2

runTestMethod · 0.76
runTestMethod · 0.76