Removed some duplication and simplified removal of == padding to use substring instead of regex
Removed some duplication and simplified removal of == padding to use substring instead of regex

taskcluster/slugid,jonasfj/slugid