def _powerString(s, npow, powchar='**', trailchar=''):
    """Raise string s to power npow with additional formatting."""
    if npow == 0:
        return ''
    elif npow == 1:
        return s + trailchar
    else:
        return s + powchar + str(npow) + trailchar
