Changes between Version 2 and Version 3 of StringBuilder
- Timestamp:
- 01/13/11 11:11:01 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
StringBuilder
v2 v3 7 7 sb = StringBuilder() 8 8 sb.appendLine('Hello [.name],') 9 sb.appendLine('Please visit [ur].') 9 sb.appendLine('Please visit [url].') 10 s.append(' (Beware of the trolls).') # append without newline sep 10 11 return sb.toString 11 12 }}} 12 13 13 If you would like to use newlines in your code, try `CobraCore.newLine` which returns the newline specific to the current platform such as '\n' or '\r\n':14 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': 14 15 {{{ 15 16 #!cobra … … 18 19 sb = StringBuilder() 19 20 sb.append('Hello [.name],[nl]') 20 sb.append('Please visit [ur ].[nl]')21 sb.append('Please visit [url].[nl]') 21 22 return sb.toString 22 23 }}}