ldap3cli.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:ldap3-cli 作者: cannatag 项目源码 文件源码
def ljust_style(string, col, styles, lengths, fill=' '):
    if not string:
        string = ''
    length = lengths[col]
    unstyled = click.unstyle(string)
    if len(unstyled) == len(string): # not already styled
        if styles:
            if col >= len(styles):
                string = apply_style(styles[:-1], string)  # apply last style for remaining fields
            else:
                string = apply_style(styles[col], string)
    if len(unstyled) < length:
        return string + fill * (length - len(unstyled))

    return string
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号