2024-02-23 14:41:30 +00:00
|
|
|
DELIMITER $$
|
2024-02-23 14:58:00 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`checkPrintableChars`(
|
2024-02-23 14:41:30 +00:00
|
|
|
vString VARCHAR(255)
|
|
|
|
) RETURNS tinyint(1)
|
|
|
|
DETERMINISTIC
|
|
|
|
BEGIN
|
|
|
|
/**
|
|
|
|
* Validates whether the input string contains only printable characters
|
|
|
|
* and Spanish special characters (such as ¡, ÿ, etc.).
|
|
|
|
*
|
|
|
|
* @vString string to check
|
|
|
|
*/
|
|
|
|
RETURN vString REGEXP '^[ -~¡-ÿ]*$';
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|