How to convert String to PWideChar in Android Platform using Delphi

  

how to convert string to PwideChar in Android Platform using Delphi ? in windows apps its done using..

var
PW: PWideChar;
begin
PW := pwidechar(widestring(String));
PW := pwidechar(widestring(Reply));
A := ExistWordInString(PW,String,[soWholeWord,soDown]); //A : Boolean

….
end;

the problems is Undeclared identifier: ‘WideString’ , how to work around this ?

Delphi 10 Berlin , Firemonkey, Android

UPDATE

well, according to http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Migrating_Delphi_Code_to_Mobile_from_Desktop ,, we cant use widestring, i cant think of another way to use string this function :

function ExistWordInString(aString:PWideChar;aSearchString:string;aSearchOptions: TStringSearchOptions): Boolean;
var
Size : Integer;
Begin
Size:=StrLen(aString);
Result := SearchBuf(aString, Size, 0, 0, aSearchString, aSearchOptions)<>nil;

Comments are closed.