Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#498 closed enhancement (invalid)

Add character categorization isDigit, isLetter, etc

Reported by: [email protected] Owned by: anonymous
Priority: high Milestone:
Component: General Version: 0.3
Keywords: Cc:
Blocked By: Blocking:


For character parsing and categorization, the following functions would be useful. I'm proposing a dojo.char namespace, but I guess dojo.string would be fine too:

  • isDigit(ch): True if the char is a digit: [0-9].
  • isLetterOrDigit(ch): True if the char is a letter or digit: [A-Z]|[a-z]|[0-9].
  • isLowerCase(ch): True if the char is a lowercase letter: [a-z].
  • isUpperCase(ch): True if the char is an uppercase letter: [A-Z].
  • isWhitespace(ch): True if the char is a whitespace: [s].

Notice that most of this regular expressions aren't Unicode enabled. But it would be better if they are.

Change History (2)

comment:1 Changed 16 years ago by Tom Trenka

Resolution: invalid
Status: newclosed

Interesting, but not sure why you would do this when the Regular Expression engine is available anywhere (with Unicode support); this functionality is already a part of JS.

Closing the ticket. Thanks for the thought, though.

comment:2 Changed 15 years ago by (none)

Milestone: 0.3release

Milestone 0.3release deleted

Note: See TracTickets for help on using tickets.