Re: Filtering only punctuation and currency
From: Michael Borgwardt (brazil_at_brazils-animeland.de)
Date: 11/19/04
- Next message: Ted Holden: "Re: CORBA or some other methodology?"
- Previous message: John C. Bollinger: "Re: Is "String s = "abc";" equal to "String s = new String("abc");"?"
- In reply to: Glenn Meter: "Filtering only punctuation and currency"
- Next in thread: Ann: "Re: Filtering only punctuation and currency"
- Reply: Ann: "Re: Filtering only punctuation and currency"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 19 Nov 2004 19:03:40 +0100
Glenn Meter wrote:
> I've got a case where I want to build a MaskFormatter that only accepts
> punctuation and currency symbols.
>
> In looking at the APIs, it seems easy to test if a character is a
> punctuation or currency symbol. But I'm not finding APIs to get the list
> of punctuation and currency symbols programatically. I just need
> something that will return the characters as a String. It seems like
> this should be easy. What stupid thing am I missing?
That's just not how the characters and character classes are
defined in Unicode or Java.
But it's simple enough to loop over all the 2^16 Java chars,
call the classification methods in java.lang.Character for
each of them and build the String for yourself.
Do that once and save the result in a file somewhere.
- Next message: Ted Holden: "Re: CORBA or some other methodology?"
- Previous message: John C. Bollinger: "Re: Is "String s = "abc";" equal to "String s = new String("abc");"?"
- In reply to: Glenn Meter: "Filtering only punctuation and currency"
- Next in thread: Ann: "Re: Filtering only punctuation and currency"
- Reply: Ann: "Re: Filtering only punctuation and currency"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|