Skip to content
This repository was archived by the owner on Sep 26, 2021. It is now read-only.
This repository was archived by the owner on Sep 26, 2021. It is now read-only.

Modifying string #51

Description

@Ducasse

random finding in PBE8 (probably there is a better place. post this directly to github?)
12.18 Strings
->Another important difference is that a String is mutable, whereas a Symbol is immutable.
-> 'hello' at: 2 put: $u; yourself
-> 'hullo'
Does not work anymore in Pharo 9 because in Pharo 9 you cannot modify a string literal (nor should you). But it is PBE8 and not PBE9..
stephan03/04/2021
'hello' beWritableObject;at: 2 put: $u; yourself
make it explicit
markus03/05/2021
'hello' copy at: 2 put: $u; yourself
or create a copy

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions