RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
UnicodeString::ToIntDef Method

Converts string to integer, returning default value if string is invalid.

Pascal
function ToIntDef(defaultValue: Integer): Integer;
C++
__fastcall int ToIntDef(int defaultValue) const;

System::UnicodeString::ToIntDef converts the given string to an integer value and returns the integer. If the string doesn't contain a valid value, the value given by defaultValue is returned. 

 

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