RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
AnsiStringBase::EnsureAnsi Method

Ensure string's data is ANSI data.

Pascal
function EnsureAnsi: AnsiStringBase&;
C++
__fastcall AnsiStringBase& EnsureAnsi();

If the string's data is Unicode, i.e., its element length is 2, System::AnsiStringBase::EnsureAnsi converts the Unicode to ANSI using the current locale.

Note: In some cases, the conversion to an ANSI string may fail.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!