Core Function isDigit

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "<pre> isDigit( <expression> ) </pre> === Description === Checks if string only contains numbers. === Parameters === ==== expression ==== The string to use. === Return Value...")
 
m (1 revision)
 
(2 intermediate revisions by one user not shown)
Line 21: Line 21:
 
=== Remarks ===
 
=== Remarks ===
  
Remember this function will NOT return true if the string is a valid float with decimal point if you wish to also allow floats check out isNumeric().
+
Remember this function will NOT return true if the string is a valid float with decimal point if you wish to also allow floats check out [[Core Function isNumeric|isNumeric( <expression> )]] or [[Core Function isFloat|isFloat( <expression> )]].
  
 
=== Example ===
 
=== Example ===

Latest revision as of 12:37, 14 June 2015

isDigit( <expression> )

Contents

Description

Checks if string only contains numbers.

Parameters

expression

The string to use.

Return Value

Success: Returns 1.

Failure: Returns 0.

Remarks

Remember this function will NOT return true if the string is a valid float with decimal point if you wish to also allow floats check out isNumeric( <expression> ) or isFloat( <expression> ).

Example

$str = "The quick brown fox";
MsgBox(     isDigit($str)      );
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox