IntToStr() function returns string which is Unicode now. I want to convert to AnsiString.
Can I use AnsiString(IntToStr(I)) safely?
Asked
Active
Viewed 8,503 times
3
2 Answers
1
Yes, you can safely convert the UnicodeString returned by IntToStr to an AnsiString. The reason it's safe is that the string it returns will only contain the digit characters '0' through '9', not any fancy Unicode digits, so the conversion to AnsiString will not lose any information.
Rob Kennedy
- 161,384
- 21
- 275
- 467