[fpc-devel] Unicodestring branch, please test and help fixing
Anton Kavalenka
anton.k at tut.by
Wed Sep 10 09:50:04 CEST 2008
I
> I fully agree with you. I would like the object oriented way of strings
> also - but I stopped asking for that ;) There are a lot of advantages
> over the small amount of disadvantages. Of course I dont like this one:
>
> S := TString.Create('');
>
> But a built in class TString that is managed by the compiler.
>
>
>
> PS : Maybe i'm a littlebit more up to date about todays concepts of
> object oriented languages - maybe because I know him personally
> http://en.wikipedia.org/wiki/Bertrand_Meyer
> There were a lot of interesting discussions, etc... altough I dont like
> Eiffel :)
>
> and also this guy was one of my profs:
> http://en.wikipedia.org/wiki/Niklaus_Wirth
>
> greetings
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
>
Jet another approach:
var
s:string;
intStr:TInternalStringClass absolute s;
TInternalStringClass(s).AsUTF8:='Some string';
writeln('String length=',intStr.length);
TMyStingClass=class(TInternalStringClass)
class function LoadFromResource(nResId:integer)
end;
intStr.LoadFromResourcse(nResId);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20080910/985025d3/attachment.html>
More information about the fpc-devel
mailing list