== StringBuilder == Cobra strings are immutable. To create something like a mutable string, use StringBuilder: {{{ #!cobra def visitMessage(url) as String sb = StringBuilder() sb.appendLine('Hello [.name],') sb.appendLine('Please visit [url].') s.append(' (Beware of the trolls).') # append without newline sep return sb.toString }}} If you would like to use explicit platform varying newlines in your code, try `CobraCore.newLine` which returns the newline specific to the current platform such as '\n' or '\r\n': {{{ #!cobra def visitMessage(url) as String nl = CobraCore.newLine sb = StringBuilder() sb.append('Hello [.name],[nl]') sb.append('Please visit [url].[nl]') return sb.toString }}} For more information on the StringBuilder class, see [http://www.google.com/search?hl=en&q=C%23+stringbuilder Google(C# StringBuilder)] See also: LibraryTopics