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 Calculator] Ambiguity regarding square brackets #22

Open
snowfrogdev opened this issue Jul 1, 2021 · 1 comment
Open

[String Calculator] Ambiguity regarding square brackets #22

snowfrogdev opened this issue Jul 1, 2021 · 1 comment

Comments

@snowfrogdev
Copy link

In the instructions, at 4.i

To change the delimiter, the beginning of the string should be a separate line formatted like this: "//[delimiter]\n[numbers]"

Seeing this, and the fact that numbers are not in square brackets in the input string, it is logical to deduce that the square brackets surrounding delimiter are also not part of the actual input and just a kind of notation.

Yet later at points 7 and 8 we read

Delimiters can be any length, using this syntax: "//[|||]\n1|||2|||3" returns 6.
Allow multiple delimiters, using this syntax: "//[|][%]\n1|2%3" returns 6.

Which seem to imply that square brackets should indeed surround the delimiters.

@ardalis
Copy link
Owner

ardalis commented Jul 8, 2021

There should be brackets around the delimiter, as the sample input shows. The numbers should probably not use that syntax since they do not require brackets. Perhaps they should use italics instead? numbers ?

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