From 8a35bb090afa148b454d80a1cde4afe9e7cbffab Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Wed, 11 Apr 2012 18:05:27 +0000 Subject: [PATCH] + ansistring version of strpnew() git-svn-id: trunk@20827 - --- compiler/cutils.pas | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/compiler/cutils.pas b/compiler/cutils.pas index 3d1b3b67f4..ae07562339 100644 --- a/compiler/cutils.pas +++ b/compiler/cutils.pas @@ -114,6 +114,7 @@ interface to that mem } function strpnew(const s : string) : pchar; + function strpnew(const s : ansistring) : pchar; {# makes the character @var(c) lowercase, with spanish, french and german character set @@ -800,6 +801,7 @@ implementation end; end; + function octal_quote(const s:string;const qchars:Tcharset):string; var i:byte; @@ -1009,6 +1011,15 @@ implementation result:=p; end; + function strpnew(const s: ansistring): pchar; + var + p : pchar; + begin + getmem(p,length(s)+1); + move(s[1],p^,length(s)+1); + result:=p; + end; + procedure stringdispose(var p : pshortstring);{$ifdef USEINLINE}inline;{$endif} begin