Copy a string: Difference between revisions
Content deleted Content added
Objective C, various string copying options |
About copying vs referencing |
||
Line 175:
[[Category:Python]]
'''Interpeter:''' Python 2.3, 2.4, 2.5
src = "Hello"▼
Since strings are immutable, this will not copy anything, just point dst to the same string:
dst = src▼
To actually copy the string:
dst = src[:]
==[[Ruby]]==
|