Copy a string: Difference between revisions
Content added Content deleted
(added Ol) |
(Emacs Lisp: Actually show how to copy a string) |
||
Line 951: | Line 951: | ||
=={{header|Emacs Lisp}}== |
=={{header|Emacs Lisp}}== |
||
⚫ | |||
( |
<lang Lisp>(let* ((str1 "hi") |
||
(str1-ref str1) |
|||
(str2 (copy-sequence str1))) |
|||
⚫ | |||
(eq str1 str1-ref) ;=> t |
|||
⚫ | |||
(equal str1 str1-ref) ;=> t |
|||
(equal str1 str2)) ;=> t |
|||
⚫ | |||
=={{header|Erlang}}== |
=={{header|Erlang}}== |