Core Function isNumeric

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "<pre> isNumeric( <expression> ) </pre> === Description === Checks if string only contains numbers. === Parameters === ==== expression ==== The string to use. === Return Val...")
 
m (1 revision)
 
(2 intermediate revisions by one user not shown)
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
  
Checks if string only contains numbers.
+
Checks if string only contains numbers. (Allows for float/double)
  
 
=== Parameters ===
 
=== Parameters ===
Line 21: Line 21:
 
=== Remarks ===
 
=== Remarks ===
  
None.
+
Remember this function will return true if the string is a valid float with decimal point if you wish to check if the string is only numbers and nothing else check out isDigit().
  
 
=== Example ===
 
=== Example ===

Latest revision as of 12:38, 14 June 2015

isNumeric( <expression> )

Contents

Description

Checks if string only contains numbers. (Allows for float/double)

Parameters

expression

The string to use.

Return Value

Success: Returns 1.

Failure: Returns 0.

Remarks

Remember this function will return true if the string is a valid float with decimal point if you wish to check if the string is only numbers and nothing else check out isDigit().

Example

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