18.117.91.153 |    

Navigation

Google Advertisement

This function check if the item is an integer.

is_integer
  1. # *********************************************************
  2. # This function check if the item is an integer.
  3. #
  4. # @param $1 - The item that will be checked
  5. # @return bool
  6. #
  7. function is_integer () {
  8.  
  9. if ! [[ "$1" =~ ^[0-9]+$ ]]; then
  10.     return 1
  11. else
  12.     return 0
  13. fi
  14.  
  15. }
Parsed in 0.002 seconds at 128.44 KB/s

Search
 
Full text search by name and content of a snippet.

User online
There are 2 users online.

Tags Cloud

Latest snippets
str2seconds
(Bash::Function)
is_integer
(Bash::Function)
file_rotate
(Bash::Function)
confirm
(Bash::Function)
is_workingtime
(Bash::Function)
last day of last month
(Bash::Snippets)
crypt_apr1_md5
(PHP::Function)
crypt_apr1_md5
(Perl::Function)
transparent
(CSS)
rfc2822Toiso8601
(PHP::Function)