🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #1086

Re: Help, newbie..question concerning character analysis of an input text string

#1086
From: VrLife
Date: Wed, 01 Sep 1999 00:00
29 lines
2125 bytes
you should try  looking into  StringTokenizer from 
java.util.StringTokenizer

vin

On Mon, 23 Aug 1999 22:41:04 +1000, "Michael Little"
<hypercom@c031.aone.net.au> wrote:

>Hello,
> I was wondering if some-one could help me, I am trying to write a short
>program to  get one sentence as a command line argument and it must return
>the following:
>1. The number of blank characters in the entire sentence
>2. The number of words in the entire sentence
>3. The number of non-blank characters in the entire sentence
>4. The average number of characters per word
>5. The length of the longest word( in characters)
>6. The length of the sentence( in words)
>7. The number of capital and lowercase characters
>8. The number of vowels and consonants.
>The input sentence can contain letters and digits, with one or more special
>characters separating each word in the sentence, and once entered the
>program should print the above values. Any suggests as how to best handle
>this problem?
>
>I am also not sure how to determine if a character is upper or lower case:
>do they belong to different character ranges?
>
>Any help appreciated!
Technical Details
Message-ID: <37cf21c2.3069948@news.primus.com.au>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <qfbw3.7309$O_1.50063@ozemail.com.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d6db,49e42ebcf2e23fff
X-Google-Attributes: gid10d6db,public
X-Google-Thread: 113ae9,49e42ebcf2e23fff
X-Google-Attributes: gid113ae9,public
From: vrlife@alienbase.mil (VrLife)
Subject: Re: Help, newbie..question concerning character analysis of an input text string
Date: 1999/09/01
Message-ID: <37cf21c2.3069948@news.primus.com.au>
X-Deja-AN: 519715438
Cache-Post-Path: diddley.primus.com.au!unknown@srac301-017.ports.primus.com.au
Content-Transfer-Encoding: 7bit
References: <qfbw3.7309$O_1.50063@ozemail.com.au>
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@telstra.net
X-Trace: nsw.nnrp.telstra.net 936190170 203.134.0.92 (Wed, 01 Sep 1999 22:49:30 EST)
Organization: Internet Primus
X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/)
MIME-Version: 1.0
NNTP-Posting-Date: Wed, 01 Sep 1999 22:49:30 EST
Newsgroups: aus.computers.java,comp.lang.java.help