def fixStringLength(s, n, ctd='...', alignRight = True):
    """
    Forces a string into a space of size `n`, using continuation
    character `ctd` to indicate truncation
    """
    try: 
       return ( s[:(n-len(ctd))] + ctd if len(s) > n 
                  else s.rjust(n) if alignRight 
                  else s.ljust(n)   
               )   
    except (AttributeError, TypeError, ValueError):
       raise AssertionError('Input should be a string')