OUString is mutable?

Norbert Thiebaud nthiebaud at gmail.com
Fri Sep 28 06:55:00 PDT 2012


On Fri, Sep 28, 2012 at 7:17 AM, Noel Grandin <noel at peralex.com> wrote:
> That is exactly what makes it weird - it looks like a Java String, but it's
> not, because you can do this:
>
>     void f(OUString s) {
>          s = "2";
>     }
>
>     OUString s = "1";
>     f(s);
>     cout << s; // will print "2"
>
> ie. the modification inside the method is visible outside the method.

Really ? it does that ?
Whoaa, that is unexpected, and way wrong. That should be considered
'entrapment' :-/

Norbert


More information about the LibreOffice mailing list