Wiki

Changes between Version 2 and Version 3 of StringBuilder

Show
Ignore:
Timestamp:
01/13/11 11:11:01 (14 years ago)
Author:
hopscc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • StringBuilder

    v2 v3  
    77    sb = StringBuilder() 
    88    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 
    1011    return sb.toString 
    1112}}} 
    1213 
    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': 
     14If 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': 
    1415{{{ 
    1516#!cobra 
     
    1819    sb = StringBuilder() 
    1920    sb.append('Hello [.name],[nl]') 
    20     sb.append('Please visit [ur].[nl]') 
     21    sb.append('Please visit [url].[nl]') 
    2122    return sb.toString 
    2223}}}