Function IsDigit() Foundation

Tests whether a character string begins with a digit.

Syntax
IsDigit( <cString> ) --> lDigit
Parameters
<cString>
<cString> is a character string expression.
Return

When the first character in <cString> is a digit (numeral), IsDigit() returns the value .T. (true), otherwise it returns .F. (false).

Description

The character function IsDigit() tests whether the first character in a character string is a digit between "0" and "9". If the first character is any other character IsDigit() returns the value .F. (false).

The result depends on SET COLLATION and can be manipulated by LocaleConfigure() .

Examples
IsDigit()
// The example shows various results for the function IsDigit() 

PROCEDURE Main 

   ? IsDigit("One Xbase++")         // result: .F. 
   ? IsDigit("2   Xbase++")         // result: .T. 

   ? IsDigit(".067")                // result: .F. 
   ? IsDigit("1,null")              // result: .T. 
   ? IsDigit( Time() )              // result: .T. 

RETURN 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.