Skip to content

Support __FlashStringHelper for other string based methods #7

Description

@Jnesselr

I think it would be useful if other string methods supported __FlashStringHelper to be able to read directly from PROGMEM.

The methods that maybe should have a PROGMEM option:

  • WriteChars
  • file_Count
  • file_Dir
  • file_Erase
  • file_Exec
  • file_Exists
  • file_FindFirst
  • file_LoadFunction
  • file_LoadImageControl
  • file_Open
  • file_PlayWAV
  • file_PutS
  • file_Run
  • gfx_Button
  • putstr
  • writeString
  • file_FindFirstRet (only for Filename)

Unfortunately, I can't see a good way of doing this that doesn't involve lots of code duplication. It's more or less what happened for the println/print function. I don't mind writing the code and submitting a PR, I just wanted to get some clarification on whether it's the right approach to duplicate these functions. For all of them but WriteChars, I think they just pass into WriteChars. So the only function that would actually be different is WriteChars itself, every other function would be identical aside from type info.

Activity

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