|
@@ -1017,34 +1017,18 @@ end;
|
|
|
|
|
|
|
|
|
|
Procedure SetString (Out S : WideString; Buf : PWideChar; Len : SizeInt);
|
|
Procedure SetString (Out S : WideString; Buf : PWideChar; Len : SizeInt);
|
|
-var
|
|
|
|
- BufLen: SizeInt;
|
|
|
|
begin
|
|
begin
|
|
SetLength(S,Len);
|
|
SetLength(S,Len);
|
|
If (Buf<>Nil) and (Len>0) then
|
|
If (Buf<>Nil) and (Len>0) then
|
|
- begin
|
|
|
|
- BufLen := IndexWord(Buf^, Len+1, 0);
|
|
|
|
- If (BufLen>0) and (BufLen < Len) then
|
|
|
|
- Len := BufLen;
|
|
|
|
- Move (Buf[0],S[1],Len*sizeof(WideChar));
|
|
|
|
- PWideChar(Pointer(S)+Len*sizeof(WideChar))^:=#0;
|
|
|
|
- end;
|
|
|
|
|
|
+ Move (Buf[0],S[1],Len*sizeof(WideChar));
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
Procedure SetString (Out S : WideString; Buf : PChar; Len : SizeInt);
|
|
Procedure SetString (Out S : WideString; Buf : PChar; Len : SizeInt);
|
|
-var
|
|
|
|
- BufLen: SizeInt;
|
|
|
|
begin
|
|
begin
|
|
SetLength(S,Len);
|
|
SetLength(S,Len);
|
|
If (Buf<>Nil) and (Len>0) then
|
|
If (Buf<>Nil) and (Len>0) then
|
|
- begin
|
|
|
|
- BufLen := IndexByte(Buf^, Len+1, 0);
|
|
|
|
- If (BufLen>0) and (BufLen < Len) then
|
|
|
|
- Len := BufLen;
|
|
|
|
- widestringmanager.Ansi2WideMoveProc(Buf,S,Len);
|
|
|
|
- //PWideChar(Pointer(S)+Len*sizeof(WideChar))^:=#0;
|
|
|
|
- end;
|
|
|
|
|
|
+ widestringmanager.Ansi2WideMoveProc(Buf,S,Len);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|