From: http://blog.sina.com.cn/s/blog_53decb4101016cl7.html
----------------------------------------------------------------------
One, string to ansistring
1. Direct assignment (with warning)
2, ansistring () type cast. (No warning)
Second, ansistring to string
1. Direct assignment (with warning)
2, String () type cast. (No warning)
Iii. string conversion to Tbytes
1, bytes:= bytesof (str) has been converted to ANSI encoding
2, bytes:= widebytesof (str) UNICODE encoding
Iv. conversion of ansistring to Tbytes
1, bytes:= bytesof (str) ANSI code
2, bytes:= widebytesof (String (str)) UNICODE encoding
V. Tbytes converted to String
1, Str:=stringof (bytes) tbytes for ANSI code
2, Str:=widestringof (bytes) tbytes for Unicode encoding
Vi. Pchar Turn string
With Strpas function, Strpas (PChar): ansistring;
Conversion between String, ansistring, and Tbytes