Home > Back-end >  Pray god to help put this sentence into DELPHI XE10 VB.NET code
Pray god to help put this sentence into DELPHI XE10 VB.NET code

Time:09-20

I have a code of VB.NET, VB.NET, baidu in the correlation function, after converted into equivalent XE10 code, including: inStr is the incoming string string, int num is integer (VB.NET)/integer (XE10), when the incoming string for the digital, English, and other non-chinese characters, both to get the result is the same, but if the incoming is string contains Chinese is different,
Try in Delphi7 environment test, although unlike XE10 get results, but and VB.NET results is different also, so might not be string and ansistring widestring different reason, don't know where is wrong, because I won't VB.NET for advice!

VB.NET:
StringType. FromChar (Strings. CRH (Strings. Asc (Strings. The mids (inStr, num, 1))));

XE10:
String (Char (word (Copy (inStr, num, 1) [1])))

CodePudding user response:

Is the Copy (inStr, num, 1), don't turn so many times,

CodePudding user response:

The best way is nested code one layer apart, debugged and see exactly where a layer of errors, to correct them,
  • Related