StrToBool

Qubes 6.0 Convertit une chaîne de caractères en un booléen

Syntaxe

function StrToBool(str: String): Boolean
str: chaîne de caractères à convertir

Remarques

Si la chaîne de caractères vaut '1', 'Y', 'Yes', 'T', 'True' (insensible à la casse), la fonction renvoie True.
Dans tous les autres cas, elle renvoie False.

Exemples

PrintLn(StrToBool('1'));     // True
PrintLn(StrToBool('Y'));     // True
PrintLn(StrToBool('YES'));   // True
PrintLn(StrToBool('True'));  // True
PrintLn(StrToBool(''));      // False
PrintLn(StrToBool('0'));     // False
PrintLn(StrToBool('N'));     // False
PrintLn(StrToBool('False')); // False

Classification

Internal