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

Add Punctuation characters set #16708

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/pure/strutils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ const
## All the characters that count as whitespace (space, tab, vertical tab,
## carriage return, new line, form feed).

Punctuation* = {'\33'..'\47', '\58'..'\64', '\91'..'\96', '\123'..'\126'}
artemklevtsov marked this conversation as resolved.
Show resolved Hide resolved
## All the characters that count as punctuation (comma, colon, dash etc).
artemklevtsov marked this conversation as resolved.
Show resolved Hide resolved

Copy link
Member

@timotheecour timotheecour Jan 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional: how about also adding Printable?
refs https://docs.python.org/3/library/string.html?highlight=string#string.printable

could also be another PR

Letters* = {'A'..'Z', 'a'..'z'}
## The set of letters.

Expand Down