BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Pos/PosEs WideString Compatible?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Non-Technical
View previous topic :: View next topic  
Author Message
Res
Guest





PostPosted: Mon Jul 26, 2004 6:36 pm    Post subject: Pos/PosEs WideString Compatible? Reply with quote



I am trying to develop my application using WideStrings throughout but the
help indicates the Pos/PosEx only accepts "string" variables. Does it
support WideStrings?

TIA


Back to top
Glen Swindell
Guest





PostPosted: Mon Jul 26, 2004 10:22 pm    Post subject: Re: Pos/PosEs WideString Compatible? Reply with quote



Yes it does, in exactly the same way.

"Res" <res (AT) totalise (DOT) co.uk> wrote

Quote:
I am trying to develop my application using WideStrings throughout but the
help indicates the Pos/PosEx only accepts "string" variables. Does it
support WideStrings?

TIA





Back to top
Colin Wilson
Guest





PostPosted: Tue Jul 27, 2004 10:41 am    Post subject: Re: Pos/PosEs WideString Compatible? Reply with quote



Res wrote:

Quote:
I am trying to develop my application using WideStrings throughout
but the help indicates the Pos/PosEx only accepts "string" variables.
Does it support WideStrings?

TIA

'Pos' accepts WideStrings. PosEx doesn't. You can create WidePosEx by
pinching the source for PosEx in StrUtils.pas and changing the first
line from:

function PosEx(const SubStr, S: string; Offset: Cardinal = 1): Integer;

.... to ...

function WidePosEx(const SubStr, S: WideString; Offset: Cardinal = 1):
Integer;

Everything else remains the same!

--
Colin - using XanaNews HTTP Transport
e-mail :colin (AT) wilsonc (DOT) demon.co.uk
web: http://www.wilsonc.demon.co.uk/delphi.htm

Posted with XanaNews 1.17.1.0

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Non-Technical All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.