method

new

v2_4_6 - Show latest stable - Class: String
new(p1 = v1, p2 = {})
public

Returns a new string object containing a copy of str.

The optional enc argument specifies the encoding of the new string. If not specified, the encoding of str (or ASCII-8BIT, if str is not specified) is used.

The optional size argument specifies the size of internal buffer. This may improve performance, when the string will be concatenated many times (and call many realloc).