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

Clarity reference missing string-ascii and string-utf8 references for many functions #2650

Closed
psq opened this issue May 10, 2021 · 1 comment · Fixed by #2676
Closed

Clarity reference missing string-ascii and string-utf8 references for many functions #2650

psq opened this issue May 10, 2021 · 1 comment · Fixed by #2676
Assignees
Labels
good first issue Appropriate for a new open source contribution. locked

Comments

@psq
Copy link
Contributor

psq commented May 10, 2021

when string-ascii and string-utf8 were introduced, many functions documentation in the Clarity reference were not modified to include references to these new types when applicable (used to be a buff but I doubt many new people are aware of that).

Example of functions that can take a string (either ascii or utf8), but not the exhaustive list:

  • as-max-len?
    instead of
Input: buff|list, uint
Output: (optional buff|list)

it should have

Input: buff|list|string-ascii|string-utf8, uint
Output: (optional buff|list|string-ascii|string-utf8)
  • concat
  • index-of (some of the examples even use ascii strings)
  • element-at
  • index-of
  • hash160 (not sure this would take it a string)
  • ...

Also, more examples could use the string-utf8, there is only 1 reference that I could find to the utf8 string notation u"abcd" in the whole reference (https://docs.stacks.co/references/language-types)

cc @pgray-hiro

@blockstack-devops
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Nov 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Appropriate for a new open source contribution. locked
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants