Class: Applocale::ValidKey

Inherits:
Object
  • Object
show all
Defined in:
lib/applocale/Util/regex_util.rb

Constant Summary collapse

REGEX_KEYSTR_IOS =
/\A[0-9a-zA-Z_\/]+\z/

Class Method Summary collapse

Class Method Details

.is_validkey(platfrom, key) ⇒ Object



9
10
11
12
13
14
# File 'lib/applocale/Util/regex_util.rb', line 9

def self.is_validkey(platfrom, key)
  return false if key.nil?
  return false if key.strip.length <= 0
  result = !REGEX_KEYSTR_IOS.match(key).nil?
  return result
end