RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
WideString::ToIntDef Method

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

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

System::WideString::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!