ePages 7.23.0 - DE_EPAGES/Twenga/API/Tools.pm

Package DE_EPAGES::Twenga::API::Tools

This package provides commong Twenga tooling.

@EXPORT_OK
IsValidHex32
ValidTwengaCountries
IsValidTwengaCountry

Functions

IsValidHex32
IsValidTwengaCountry
ValidTwengaCountries

IsValidHex32

validates if string is hexadecimal and 32 characters long

Syntax
$result = IsValidHex32($str);
Example
if( IsValidHex32($str) ) { }
Input
$str (string)
Hexadecimal 32 chars long string
Return
(boolean)
$result

IsValidTwengaCountry

validates a country code2 as valid country for Twenga

Syntax
$result = IsValidTwengaCountry($countryCode);
Example
if( IsValidTwengaCountry($countryCode) ) { }
Input
$countryCode (string)
country code2
Return
(boolean)
$result

ValidTwengaCountries

returns an array with the valid countries (code2) for Twenga

Syntax
$aCountryCodes = ValidTwengaCountries();
Example
my $aCountryCodes = ValidTwengaCountries();
Return
(ref array)
$aCountryCodes