A String buffer is an efficient way to build a big string by appending small elements together.
Its cross-platform implementation uses String concatenation internally, but StringBuf may be optimized for different targets.
Unlike String, an instance of StringBuf is not immutable in the sense that it can be passed as argument to functions which modify it by appending more values. However, the internal buffer cannot be modified.
Creates a new StringBuf instance.
This may involve initialization of the internal buffer.
The length of
this StringBuf in characters.
Appends the representation of
The exact representation of
x may vary per platform. To get more consistent behavior, this function should be called with Std.string(x).
x is null, the String "null" is appended.
Appends the character identified by
c is negative or has another invalid value, the result is unspecified.
Appends a substring of
This function expects
len to describe a valid substring of
s, or else the result is unspecified. To get more robust behavior,
this.add(s.substr(pos,len)) can be used instead.
pos are null, the result is unspecified.
len is omitted or null, the substring ranges from
pos to the end of
Returns the content of
this StringBuf as String.
The buffer is not emptied by this operation.
© 2005–2016 Haxe Foundation
Licensed under a MIT license.