Skip Menu |

This queue is for tickets about the Text-CharWidth CPAN distribution.

Report information
The Basics
Id: 66517
Status: new
Priority: 0/
Queue: Text-CharWidth

People
Owner: Nobody in particular
Requestors: leonerd-cpan [...] leonerd.org.uk
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Consider adding a column-aware substr()-like replacement
I'd find it quite useful to have a substr-like function that counted screen columns instead of bytes/chars. If you consider the difference between length $str vs mbswidth $str as counting in bytes/characters or screen columns, then it would suggest such a function as substr $str, $start, $len vs mbswsubstr $str, $start, $width to take a substring starting at the $start'th column and proceeding for the next $width columns. I'd be quite happy to have a go at implementing this - how would you like a patch? -- Paul Evans