Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Count only visible characters?



Is there any way to count only visible characters?

    testing="%F{green}hello"
    echo ${(%)#testing}

The number I'm interested in is 5 not 14.

After an awful lot of Googling, I'm under the impression this isn't a trivial 
problem. If that is true, I would certainly enjoy a little exposition if someone 
has time.

Thanks.
- Seth



Messages sorted by: Reverse Date, Date, Thread, Author