Adding private API functions for stringToRegister conversion and
range checks. This is part of issue #11.