Skip to content

Support for width of char iterator #82

Closed

Description

@danielrainer

We have a use case where we would need to allocate in order to create a str of which we can then compute the width. If we could instead pass a char iterator to this crate, we could avoid this allocation.

I've seen that internally, the provided &str is already immediately converted to a char iterator (in src/tables.rs:str_width), so the internal logic probably would not need to be modified. Would you be willing to have support for char iterator width computation in the public interface?

Activity

  1. Manishearth commented on Feb 12, 2026

    @Manishearth
    Member

    Yes, perhaps as two free functions.

  2. added 2 commits that reference this issue on Feb 12, 2026
    0209b24
    63cf06e
  3. added a commit that references this issue on May 26, 2026
    ab7a6dc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions