Added string_util_pkg.is_str_alphanumeric

This commit is contained in:
Matthew Hasbach 2015-05-12 17:37:29 -04:00
parent 42b5cd2e6f
commit 01f129e2a5
2 changed files with 25 additions and 0 deletions

View File

@ -487,6 +487,28 @@ begin
end remove_non_alpha_chars;
function is_str_alphanumeric (p_str in varchar2) return boolean
as
l_returnvalue boolean;
begin
/*
Purpose: returns true if string is alphanumeric
Who Date Description
------ ---------- -------------------------------------
MJH 12.05.2015 Created
*/
l_returnvalue := regexp_instr(p_str, '[^a-z|A-Z|0-9]') = 0;
return l_returnvalue;
end is_str_alphanumeric;
function is_str_empty (p_str in varchar2) return boolean
as
l_returnvalue boolean;

View File

@ -92,6 +92,9 @@ as
-- remove all non-alpha characters (A-Z) from string
function remove_non_alpha_chars (p_str in varchar2) return varchar2;
-- returns true if string is alphanumeric
function is_str_alphanumeric (p_str in varchar2) return boolean;
-- returns true if string is "empty" (contains only whitespace characters)
function is_str_empty (p_str in varchar2) return boolean;