Merge pull request #12 from mjhasbach/string_util_pkg.is_str_alphanumeric
Added string_util_pkg.is_str_alphanumeric
This commit is contained in:
commit
c8d8137c2d
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user