You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Usually, one does not want to check individual characters, but strings as a whole. Since this results in repeating the same boilerplate over and over, how about providing a direct mechanism on &str for this purpose? I'm thinking of three methods: starts_with_xid_start, is_xid_continue, is_xid_ident. I'm fine with them being either standalone methods or trait extensions to str.
The text was updated successfully, but these errors were encountered:
s.chars().all(UnicodeXID::is_xid_continue) is not only twice as long, which I would not call insignificant, it is also less concise to read (one mental operation vs three).
Usually, one does not want to check individual characters, but strings as a whole. Since this results in repeating the same boilerplate over and over, how about providing a direct mechanism on
&str
for this purpose? I'm thinking of three methods:starts_with_xid_start
,is_xid_continue
,is_xid_ident
. I'm fine with them being either standalone methods or trait extensions tostr
.The text was updated successfully, but these errors were encountered: