Skip to content

Porting problems #153

Description

@TooManyDots

I have some old code that i would like to port over. It currently looks like this

  int nI;
  char sTag[256] = {};
  sscanf(input, "%255[^\x5B]\x5B%d\x5D", sTag, &nI);

All this does is basically parse "some_string_data[123]" into "some_string_data" and 123.

Now i am unable to get the correct scnlib format string to get this to work. One would have thought that {}[{}] would be enough. I can not find in the docs or examples any way to make this work.

I actually do not care for the 255 length requirement it can be a std::string or even better std::string_view.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions