All snippets of the tag check |
|
1-10 of 25 Entries |
|
|
is_integer (Bash::Function) |
Created by Marko Schulz at 2023-02-23 21:43:42 |
# *********************************************************
# This function check if the item is an integer.
#
# @param $1 - The item that will be checked
# @return bool
#
function is_integer () {
if ! [[ "$1" =~ ^[0-9]+$ ]]; then
return 1
e... |
|
function_exists (JavaScript::Snippets) |
Created by Marko Schulz at 2010-02-18 17:38:46 |
/**
* Return TRUE if the given function has been defined.
*/
function function_exists (function_name) {
// Original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
if (typeof function_name == 'string'){
return (typeof this.window[func... |
|
function_exists (Bash::Function) |
Created by Marko Schulz at 2010-02-02 00:10:34 |
# ***************************************************************************
# This function check if an defined function or command exist.
#
# @param string $1 function name (required)
# @return bool
# @example: ! function_exists "rc_myfunc" &... |
|
isDir (PHP::Check) |
Created by Marko Schulz at 2010-01-26 00:10:47 |
function isDir( &$file, $writable = False ) {
clearstatcache(); // clear the status chache
if ( is_dir($file) && ( $writable ? is_writable($file) : is_readable($file) ) )
return True;
else
return False;
} |
|
isFile (PHP::Check) |
Created by Marko Schulz at 2010-01-26 00:09:50 |
function isFile( &$file, $writable = False ) {
clearstatcache(); // clear the status chache
if ( is_file($file) && ( $writable ? is_writable($file) : is_readable($file) ) )
return True;
else
return False;
} |
|
is_string (Perl::Check) |
Created by Marko Schulz at 2010-01-20 14:18:11 |
# **************************************************************
# This function check if the reference is a SCALAR.
#
# @example: print "ERROR: A SCALAR is needed\n" if ( !is_string(\$string) );
sub is_string {
my $ref = shift;
return 0 unless ... |
|
is_hash (Perl::Check) |
Created by Marko Schulz at 2010-01-20 14:17:50 |
# **************************************************************
# This function check if the reference is a HASH.
#
# @example: print "ERROR: A HASH is needed\n" if ( !is_hash(\%$hash) );
sub is_hash {
my $ref = shift;
return 0 unless ref $ref;... |
|
is_array (Perl::Array) |
Created by Marko Schulz at 2010-01-20 14:17:28 |
# **************************************************************
# This function check if the reference is an ARRAY.
#
# @see: http://affy.blogspot.com/p5be/ch08.htm
# @example: print "ERROR: A ARRAY is needed\n" if ( !is_array(\@$array) );
sub is... |
|
check_width (Perl::Check) |
Created by Marko Schulz at 2010-01-20 14:16:52 |
my $width='101%';
print check_width($width);
# **********************************************************
# Eingabe von Tabellenbreite checken (1=falsch/0=richtig)...
sub check_width {
if ($_[0] !~ /^(([1-9])|([1-9][0-9])|(100))(\%|px)$/)
... |
|
check_url (Perl::Check) |
Created by Marko Schulz at 2010-01-20 14:16:24 |
sub check_url {
# Syntax der WebAdresse checken (http:// - 1=True)...
if ($_[0] =~ /^(f|ht)tp:\/\/.+\..+/) { return 1; } else { return 0; }
} |
|
1-10 of 25 Entries |
|
|