comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Checking to see if a string is a letter
Date: Mon, 02 Apr 2012 22:15:27 -0700
Date: 2012-04-02T22:15:27-07:00	[thread overview]
Message-ID: <jle13q$ale$1@tornado.tornevall.net> (raw)
In-Reply-To: <jldvm4$8su$1@dont-email.me>

On 04/02/2012 09:52 PM, deuteros wrote:
> Leo Brewin<leo.brewin@internode.on.net>  wrote in
> news:2030859.0.1333426683573.JavaMail.geo-discussion-forums@pbbnv8:
>
>> On Tuesday, 3 April 2012 12:11:56 UTC+10, deuteros  wrote:
>>
>>> Is there a way to check if a string variable contains a single letter?
>>
>> Yes.
>
> So how would one do that? In Java I would use regular expressions, and GNAT
> seems to have a library for regular expressions, but I'm looking for
> something a little more portable.

What do you mean by "contains a single letter"?

For example, given

S1 : String := "12345j%^&*(";
S2 : String := "A";

you have 2 String variables, both of which contain a single letter. S1 contains 
other characters as well, while S2 contains only a single letter.

It will probably also help to explain the problem that gives rise to this 
sub-problem, as context is always helpful in knowing how to answer.

-- 
Jeff Carter
"It is the German who is so uncourteous to his verbs."
A Scandal in Bohemia
122



  reply	other threads:[~2012-04-03  5:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-03  2:11 Checking to see is a string is a letter deuteros
2012-04-03  4:18 ` Leo Brewin
2012-04-03  4:52   ` Checking to see if " deuteros
2012-04-03  5:15     ` Jeffrey Carter [this message]
2012-04-03  6:07       ` deuteros
2012-04-03  6:47         ` Gautier write-only
2012-04-03 12:55           ` deuteros
2012-04-03 14:19             ` gautier_niouzes
2012-04-03  8:26         ` Simon Wright
2012-04-03 12:56           ` deuteros
2012-04-03 13:46           ` Dmitry A. Kazakov
2012-04-05 17:12           ` deuteros
2012-04-05 17:24             ` Martin Dowie
2012-04-05 18:04               ` deuteros
2012-04-05 18:18             ` Adam Beneschan
2012-04-05 18:56             ` Simon Wright
2012-04-03 20:40         ` Jeffrey Carter
2012-04-03  7:09 ` Checking to see is " Thomas Løcke
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox