Afficher : Delphi C++
Préférences d'affichage

System.SysUtils.StrToIntDef

De XE2 API Documentation

Delphi

function StrToIntDef(const S: string; Default: Integer): Integer;

C++

extern PACKAGE int __fastcall StrToIntDef(const System::UnicodeString S, int Default)/* overload */;

Propriétés

Type Visibilité  Source Unité  Parent
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils

Description

Convertit en nombre une chaîne qui représente un entier (décimal ou hexadécimal), avec renvoi de Default en cas d'erreur.

StrToIntDef convertit la chaîne AnsiStringS, qui représente un nombre entier en notation décimale ou hexadécimale. If S ne représente pas un nombre valide, StrToIntDef renvoie Default.

Voir aussi

Versions précédentes
Traductions