• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is a connecting character?

 
adam Lui
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
damn, sorry for another stupid question
 
Henry Wong
author
Marshal
Pie
Posts: 21021
78
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Give us some context please. Where did you hear this term? And what was the exact phrasing?

Henry
 
Kelvin Chenhao Lim
Ranch Hand
Posts: 513
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This isn't a stupid question, Adam. I'm guessing you're talking about "connecting characters" that are allowed in Java identifiers. This is language-specific, so it'll vary from language to language (human language, not programming language!). But in English/Latin, the only such character is the underscore (_).

In general, a connecting character is one for which Character.getType() returns a value with the CONNECTOR_PUNCTUATION flag (bit 23) set.

Incidentally, the set of characters allowed within a Java identifier are those for which Character.isJavaIdentifierPart() returns true, while the characters allowed at the start of a Java identifier is the smaller subset for which Character.isJavaIdentifierStart() returns true.

I don't know of any examples of connecting characters from non-English languages, although maybe some other folks here can chime in.
[ November 05, 2007: Message edited by: Kelvin Lim ]
 
Kelvin Chenhao Lim
Ranch Hand
Posts: 513
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, I figured it out from the API spec. The connecting characters are those that belong to the Unicode category 'Pc' (Punctuation, connector). Here's a complete list for the current version of the Unicode spec:

http://www.fileformat.info/info/unicode/category/Pc/list.htm
[ November 05, 2007: Message edited by: Kelvin Lim ]
 
adam Lui
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am awed Kelvin, thank YOU (again)!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic