Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-08

More WideString routines

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Felipe Monteiro de Carvalho

Hello,

From time to time when I use widestring I miss equivalent functions to

those available for ansistrings.

At the moment I need a widestring replacement for StrPos. I searched for WideStrPos in my FPC 2.2.2 but nothing came. Any ideas?

And if we really lack more widestring routines, where should they be placed?

thanks,

Felipe Monteiro de Carvalho
theo
to Felipe Monteiro de Carvalho
Show quoted text 7 lines
Hello, At the moment I need a widestring replacement for StrPos. I searched for WideStrPos in my FPC 2.2.2 but nothing came. Any ideas?
StrPos is for PChar. Do you mean Pos? There are lots of versions of Pos.
One of them is
Function Pos (Const Substr : WideString; Const Source : WideString) :
SizeInt;
Felipe Monteiro de Carvalho
to theo

Indeed, thanks,

But from time to time I also miss PWideChar routines, specially when converting C code.

Felipe Monteiro de Carvalho
Jonas Maebe
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote
But from time to time I also miss PWideChar routines, specially when converting C code.

wchar_t seldom has the same size as widechar (it's very often 4 bytes). Translating wchar_t* by pwidechar is therefore wrong (except for specific platforms).

Jonas