Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String length #140

Closed
BacchusFLT opened this issue Jan 31, 2023 · 3 comments
Closed

String length #140

BacchusFLT opened this issue Jan 31, 2023 · 3 comments

Comments

@BacchusFLT
Copy link

Selecting a string operand, I would seek an option to select the string lengths.

My scenario here is a big block of text that form a screen, which means I would like to see that the strings are 40 chars long (one string = one screen row).

@fadden
Copy link
Owner

fadden commented Jan 31, 2023

There's currently no length-limiter on string selection. The best you can do right now is:

  1. Select full block.
  2. In the "Bulk Data" section of Edit Operand, select "Densely-packed bytes" with a limit of 40 bytes per line. This splits lines at the appropriate boundaries.
  3. Put labels at the start of every line (@line0, @line1, ...).
  4. Select the full block and format it as a string. The labels cause the formatting to be split.

Not great. To make this easier I think we'd need to generalize the "bytes per line" restriction. It's not part of the operand format descriptor; the dialog just uses it to generate multiple separate formatters. So making bytes-per-line apply more generally shouldn't pose a problem.

(Note to self: the dialog currently dislikes treating single bytes as strings, which would be an issue if you (say) selected 81 bytes and tried to format 40 per line. It rejects the entire set. Need to fix that.)

@BacchusFLT
Copy link
Author

BacchusFLT commented Feb 1, 2023 via email

@fadden
Copy link
Owner

fadden commented Feb 2, 2023

Added "generalize max-byte-per-line" feature to "TO DO" wiki.

@fadden fadden closed this as completed Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants