def get_studio_version_string(agp_version):
    """Returns the named Android Studio version for a given AGP version"""
    split = agp_version.split("-")
    # No stability suffix, i.e agp_version is similar to '3.4.0', not '3.4.0-beta03'
    if len(split) == 1:
        return agp_version

    # Split up the version into two parts, prefix being similar to '3.4.0', and suffix 'beta03'
    prefix, suffix = split

    # Remove the patch number as this is not used by Studio outside of stable releases
    major_version = prefix[:-2]

    suffix = suffix.replace("alpha", "Alpha")
    suffix = suffix.replace("beta", "Beta")
    suffix = suffix.replace("canary", "Canary")
    suffix = suffix.replace("rc", "RC")

    release_type = suffix[:-2]

    minor_version = suffix[-2:]
    if minor_version[:1] == "0":
        minor_version = minor_version[-1:]

    studio_version_string = "Android Studio %s %s %s" % (major_version, release_type, minor_version)
    return studio_version_string