| View previous topic :: View next topic |
| Author |
Message |
Res Guest
|
Posted: Mon Jul 26, 2004 6:36 pm Post subject: Pos/PosEs WideString Compatible? |
|
|
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
|
Posted: Mon Jul 26, 2004 10:22 pm Post subject: Re: Pos/PosEs WideString Compatible? |
|
|
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
|
Posted: Tue Jul 27, 2004 10:41 am Post subject: Re: Pos/PosEs WideString Compatible? |
|
|
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 |
|
 |
|