3.149.230.44 |    

Navigation

Google Advertisement

Mit der Funktion is_string() kann Überprüft werden, ob die angegebene Variable eine Zeichenkette enthält. Wenn die Variable eine Zeichenkette ist wird TRUE (bzw. 1) zurückgegeben, ansonsten FALSE (bzw. 0).

is_string
  1. # **************************************************************
  2. # This function check if the reference is a SCALAR.
  3. #
  4. #  @example: print "ERROR: A SCALAR is needed\n" if ( !is_string(\$string) );
  5.  
  6. sub is_string {
  7.  
  8. my $ref = shift;
  9. return 0 unless ref $ref;
  10. if ( $ref =~ /^SCALAR/ ) { return 1; } else { return 0; }
  11.  
  12. }
Parsed in 0.001 seconds at 333.31 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)